运行时异常:程序在运行过程中(而非编译阶段)由于某种错误或意外条件而抛出的异常/错误信号。常见于输入不合法、空指针、数组越界、除以零、资源不可用等情况。(在某些语言如 Java 中,Runtime Exception 常特指“不强制捕获的异常”一类。)
/ˈrʌnˌtaɪm ɪkˈsɛpʃən/
A runtime exception stopped the program.
运行时异常导致程序停止了。
If the file path is invalid, the application may throw a runtime exception when it tries to load the configuration.
如果文件路径无效,应用在尝试加载配置时可能会抛出运行时异常。
runtime 由 run(运行)+ time(时间)构成,指“程序实际执行的阶段”。exception 来自拉丁语 exceptio,有“例外、排除”的含义;在编程语境中引申为“偏离正常流程的情况”,需要被“抛出/处理”。合在一起即“运行阶段出现的异常”。