mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-08 16:05:05 -04:00
merge with upstream. Fixed confict in pad.html
This commit is contained in:
parent
3248ca4cbb
commit
254046454d
91 changed files with 1674 additions and 1363 deletions
17
node/utils/customError.js
Normal file
17
node/utils/customError.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
This helper modules allows us to create different type of errors we can throw
|
||||
*/
|
||||
function customError(message, errorName)
|
||||
{
|
||||
this.name = errorName || "Error";
|
||||
this.message = message;
|
||||
|
||||
var stackParts = new Error().stack.split("\n");
|
||||
stackParts.splice(0,2);
|
||||
stackParts.unshift(this.name + ": " + message);
|
||||
|
||||
this.stack = stackParts.join("\n");
|
||||
}
|
||||
customError.prototype = Error.prototype;
|
||||
|
||||
module.exports = customError;
|
Loading…
Add table
Add a link
Reference in a new issue