There are three types of errors that programmers frequently encounter. Let’s examine the first one, runtime error or runtime exceptions, by looking at the example below.
When we run the code above, an error occurs and nothing is printed out onto the console. Runtime errors happen after the code is compiled and when the program runs the code. Because these errors cause the program to crash, they are hard to track down. In these cases, using comments to group off parts of the source code to narrow down the location of the error is a useful approach.
In the example above, we encounter a runtime error because the program is unable to divide by zero. In these types of errors, the program reaches something illegal, something it is unable to understand, or if it’s unable to find the code.
Coding Rooms
Founder and CEO