> ```javascript 
> function CustomError(message) { 
>    this.message = message || ''; 
> } 
> CustomError.prototype = new Error; 
>  
> // whenever you need 
> throw new CustomError; 
> ``` 

At best, this will not preserve the stack trace property, at worse this will 
lead to a bad one.                                           
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to