Can I define custom types for user-defined exceptions in JavaScript? If so, how would I do it?
ES6
With the new class and extend keywords it’s now much easier:
class CustomError extends Error { constructor(message) { super(message); //something } }