Javascript Exception Handling Try-Catch-Throw - (Learning Javascript Series)

Javascript Exception/Error Handling

Exception handling is one of the difficult and oftenly avoided task by the developer. It is because handling exception requires almost equal amount of time and thinking from developer as given to the main program. In javascript 1.4 exception handling was supported by adding try-catch-throw to the language.

Exceptions are generally categorized in 2 types:

System Error: Caused by browser/code because of unknown reason(s).

Application Error: Caused by a piece of code where the scenario in which an error can occur is not handled by the developer.


Posts By Month