V2EX  ›  英汉词典

Runtime Error

定义 (Definition)

“runtime error” 指程序在运行过程中发生的错误:代码可能能通过编译/解释启动,但在执行到某一步时因异常情况(如除以零、空指针、越界访问、类型不匹配、资源不足等)而崩溃或报错。也常写作 run-time error。在不同语言/环境中,它常以 “exception(异常)” 的形式出现。

发音 (Pronunciation, IPA)

/ˈrʌnˌtaɪm ˈɛrər/

例句 (Examples)

The app crashed because of a runtime error.
这个应用因为运行时错误而崩溃了。

The program compiled successfully, but a runtime error occurred when it tried to read a missing file, so the process stopped unexpectedly.
程序成功编译了,但在尝试读取一个不存在的文件时发生了运行时错误,因此进程意外停止。

词源 (Etymology)

“runtime” 由 run(运行)+ time(时间) 组成,指“程序实际执行的阶段”;“error” 源自拉丁语 error,意为“偏离、错误”。合起来,“runtime error” 直译为“在运行阶段出现的错误”,用来区别于 compile-time error(编译期错误)

相关词 (Related Words)

文学与著作中的用例 (Literary / Notable Works)

  • The C Programming Language(Kernighan & Ritchie):讨论程序执行期间的错误情形(如未定义行为、非法内存访问),常与“运行时错误/崩溃”相关语境出现。
  • *Structure and Interpretation of Computer Programs (SICP)*:在讲解解释器与求值时,经常用“运行时错误/异常”来说明程序在执行阶段失败的情况。
  • Python Cookbook(David Beazley 等):以异常处理为核心内容之一,runtime error 常对应 Python 的运行时异常(如 FileNotFoundErrorTypeError)。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2453 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms · UTC 12:17 · PVG 20:17 · LAX 04:17 · JFK 07:17
♥ Do have faith in what you're doing.