-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy patherrors.js
More file actions
28 lines (19 loc) · 681 Bytes
/
errors.js
File metadata and controls
28 lines (19 loc) · 681 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// This module provides all of the custom errors defined by this library.
/*jslint onevar: true, undef: true, eqeqeq: true, bitwise: true,
newcap: true, immed: true, nomen: false, white: false, plusplus: false,
laxbreak: true */
/*global define, setTimeout */
define(["util"], function (util) {
var exports = {};
function defineError (name, Parent) {
Parent = Parent || Error;
exports[name] = function (msg) {
Parent.call(this, msg);
};
util.inherits(exports[name], Parent);
exports[name].prototype.name = name;
}
defineError("BadRevision");
defineError("NoSuchDocument");
return exports;
});