What is a runtime error?

In essence its an error that occurs during the execution in a program rather than an error which is identified at compile time.

An example would be trying to access a piece of memory a program doesnt have access to. For example writing beyond the end of an array in C/C++ would cause a runtime error as the compiler assumes you want to do this where as in Java it would most likely cause a compile time error as it assumes you dont / wont allow you to.
 
Exactly what is says on the tin - its an error in the application that is thrown at runtime (e.g. why the application is running), as opposed to a compile error which happens when the exe or dll is compiled.

EDIT: as for causes, take your pick! Anything can cause runtime errors, although how they're handled is different (handled and unhandled exceptions). Handled being when you think they might occur (like reading/writing from the registry) or unhandled (normally when a user tries something daft and unexpected ;))
 
Last edited:
Back
Top Bottom