Creating Custom Errors in JavaScript

テクノロジー



Did you know that you can create your own custom Error objects in JavaScript?
This can be accomplished with both the older ES5 standard syntax and the newer JS Class syntax.
This video walks through building and handling errors with both approaches and a practical example of a custom Network Error.

Code from video: https://gist.github.com/prof3ssorSt3v3/ea48b9c4bfe1a0e750f1f7a2c1df98d0

Comments

Copied title and URL