diff options
Diffstat (limited to 'lib/caldav/request/errors.js')
-rw-r--r-- | lib/caldav/request/errors.js | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/lib/caldav/request/errors.js b/lib/caldav/request/errors.js deleted file mode 100644 index 700cfba..0000000 --- a/lib/caldav/request/errors.js +++ /dev/null @@ -1,49 +0,0 @@ -(function(module, ns) { - - function CaldavHttpError(code) { - this.code = code; - var message; - switch(this.code) { - case 401: - message = 'Wrong username or/and password'; - break; - case 404: - message = 'Url not found'; - break; - case 500: - message = 'Server error'; - break; - default: - message = this.code; - } - Error.call(this, message); - } - - CaldavHttpError.prototype = { - __proto__: Error.prototype, - constructor: CaldavHttpError - } - - // Unauthenticated error for - // Google Calendar - function UnauthenticatedError() { - var message = "Wrong username or/and password"; - Error.call(this, message); - } - - UnauthenticatedError.prototype = { - __proto__: Error.prototype, - constructor: UnauthenticatedError - } - - module.exports = { - CaldavHttpError: CaldavHttpError, - UnauthenticatedError: UnauthenticatedError - }; - -}.apply( - this, - (this.Caldav) ? - [Caldav('request/errors'), Caldav] : - [module, require('../caldav')] -)); |