Skip to content

Instantly share code, notes, and snippets.

View ehsanullahjan's full-sized avatar

Ehsan J. ehsanullahjan

  • Oracle
  • Michigan, USA
  • 05:01 (UTC -04:00)
  • X @null_ptrz
View GitHub Profile
@ehsanullahjan
ehsanullahjan / illegal-argument-error.js
Created May 24, 2015 05:29
Custom errors in JavaScript
function IllegalArgumentError(message) {
Error.call(this, message);
this.name = 'IllegalArgumentError';
}
IllegalArgumentError.prototype = new Error();
IllegalArgumentError.prototype.constructor = IllegalArgumentError;