overleaf/services/clsi/app/coffee/Errors.coffee

26 lines
791 B
CoffeeScript
Raw Normal View History

NotFoundError = (message) ->
error = new Error(message)
error.name = "NotFoundError"
error.__proto__ = NotFoundError.prototype
return error
NotFoundError.prototype.__proto__ = Error.prototype
2017-08-03 10:56:59 -04:00
FilesOutOfSyncError = (message) ->
error = new Error(message)
error.name = "FilesOutOfSyncError"
error.__proto__ = FilesOutOfSyncError.prototype
return error
FilesOutOfSyncError.prototype.__proto__ = Error.prototype
2017-09-22 11:19:33 -04:00
AlreadyCompilingError = (message) ->
error = new Error(message)
error.name = "AlreadyCompilingError"
error.__proto__ = AlreadyCompilingError.prototype
return error
AlreadyCompilingError.prototype.__proto__ = Error.prototype
module.exports = Errors =
NotFoundError: NotFoundError
2017-08-03 10:56:59 -04:00
FilesOutOfSyncError: FilesOutOfSyncError
2017-09-22 11:19:33 -04:00
AlreadyCompilingError: AlreadyCompilingError