JavaScript: The Ultimate Beginner's Guide! by Andrew Johansen

JavaScript: The Ultimate Beginner's Guide! by Andrew Johansen

Author:Andrew Johansen [Johansen, Andrew]
Language: eng
Format: epub
Published: 2016-01-23T18:30:00+00:00


The Different Types of Exceptions

In JavaScript, you can throw any type of object. However, thrown objects may possess different characteristics. Although it is usual to throw strings and/or numbers as error messages, it is usually more beneficial to utilize the exception types designed for this purpose. Here are two of the most popular exceptions in JavaScript:

DOMError – This exception represents a named error object.

DOMException - This exception indicates an abnormal situation that happens while a property or method is being used. To use this exception, you must add DOMError() into your code.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.