Instead, they occur when you make a mistake in the logic that drives your script and you do not get the result you expected. See Obtaining an API key. If you close the console, press the ESC key again to open it. Throwing string values, as some of the examples in this chapter do, is rarely a good idea, because it makes it hard to recognise the type of the exception.
The catch statement allows you to define a block of code to be executed, if an error occurs in the try block. Also note that the debugging tools built into some IE versions are limited, and may not be available. 1. The message property combined with the name property is used by the Error.prototype.toString() method to create a string representation of the Error. this content The Error Message In Internet Explorer's default setting, a small warning icon appears in the status bar like the one pictured left.