Skip to content

Instantly share code, notes, and snippets.

Aliaksei Krauchanka aliakseikrauchanka

Block or report user

Report or block aliakseikrauchanka

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
justmoon / custom-error.js
Last active Sep 21, 2019 — forked from subfuzion/
Creating custom Error classes in Node.js
View custom-error.js
'use strict';
module.exports = function CustomError(message, extra) {
Error.captureStackTrace(this, this.constructor); =;
this.message = message;
this.extra = extra;
require('util').inherits(module.exports, Error);
You can’t perform that action at this time.