Runtime errors
In computer science, the qualifier run time, run-time, runtime, or execution time may have different meanings depending on the context. From a technical perspective it may refer to the time during which a program is running (executing). It contrasts to other phases of program such as compile time, link time, load time, etc. Closely linked to this most basic sense is the state of the entire system on which the program is running, which affects the program's execution and which varies between instances. Such as, in a software licensing context, "runtime" refers to the broader idea of an installation of a given software or computer program on a computer or server whether running or not.
A run-time error is detected after or during the execution a program, whereas a compile-time error is detected by the compiler before the program is ever executed. Type checking, storage allocation, and even code generation and code optimization may be done at compile-time or upon a run-time, depending on the language and compiler.
Implementation details
In most cases, the execution of a program begins after a loader performed the necessary memory setup and linked the program with any dynamically linked libraries it needs. In some cases a language or implementation will have these tasks done by the language runtime instead, though this is unusual in mainstream languages on common consumer operating systems.
Some program debugging can only be performed (or are more efficient or accurate) when performed at runtime. Logical errors and array bounds checking are examples. For this reason, some programming bugs are not discovered until the program is tested in a "live" environment with real data, despite sophisticated compile-time checking and pre-release testing. In this case, the end user may encounter a runtime error message.
Application errors — exceptions
Exception handling is one language feature designed to handle runtime errors, providing a structured way to catch completely unexpected situations as well as predictable errors or unusual results without the amount of inline error checking required of languages without it. More recent advancements in runtime engines enable automated exception handling which provides 'root-cause' debug information for every exception of interest and is implemented independent of the source code, by attaching a special software product to the runtime engine.

