2020-05-06 06:09:15 -04:00
|
|
|
/* eslint-disable
|
|
|
|
no-proto,
|
|
|
|
no-unused-vars,
|
|
|
|
*/
|
|
|
|
// TODO: This file was created by bulk-decaffeinate.
|
|
|
|
// Fix any style issues and re-enable lint.
|
2020-05-06 06:09:33 -04:00
|
|
|
let Errors
|
2021-10-26 04:08:56 -04:00
|
|
|
function NotFoundError(message) {
|
2020-05-06 06:09:33 -04:00
|
|
|
const error = new Error(message)
|
|
|
|
error.name = 'NotFoundError'
|
|
|
|
error.__proto__ = NotFoundError.prototype
|
|
|
|
return error
|
|
|
|
}
|
|
|
|
NotFoundError.prototype.__proto__ = Error.prototype
|
2014-02-12 05:40:42 -05:00
|
|
|
|
2021-10-26 04:08:56 -04:00
|
|
|
function OpRangeNotAvailableError(message) {
|
2020-05-06 06:09:33 -04:00
|
|
|
const error = new Error(message)
|
|
|
|
error.name = 'OpRangeNotAvailableError'
|
|
|
|
error.__proto__ = OpRangeNotAvailableError.prototype
|
|
|
|
return error
|
|
|
|
}
|
|
|
|
OpRangeNotAvailableError.prototype.__proto__ = Error.prototype
|
2016-05-31 08:24:19 -04:00
|
|
|
|
2021-10-26 04:08:56 -04:00
|
|
|
function ProjectStateChangedError(message) {
|
2020-05-06 06:09:33 -04:00
|
|
|
const error = new Error(message)
|
|
|
|
error.name = 'ProjectStateChangedError'
|
|
|
|
error.__proto__ = ProjectStateChangedError.prototype
|
|
|
|
return error
|
|
|
|
}
|
|
|
|
ProjectStateChangedError.prototype.__proto__ = Error.prototype
|
2017-08-07 09:43:28 -04:00
|
|
|
|
2021-10-26 04:08:56 -04:00
|
|
|
function DeleteMismatchError(message) {
|
2020-05-06 06:09:33 -04:00
|
|
|
const error = new Error(message)
|
|
|
|
error.name = 'DeleteMismatchError'
|
|
|
|
error.__proto__ = DeleteMismatchError.prototype
|
|
|
|
return error
|
|
|
|
}
|
|
|
|
DeleteMismatchError.prototype.__proto__ = Error.prototype
|
2019-05-07 09:15:26 -04:00
|
|
|
|
2022-07-06 05:50:16 -04:00
|
|
|
function FileTooLargeError(message) {
|
|
|
|
const error = new Error(message)
|
|
|
|
error.name = 'FileTooLargeError'
|
|
|
|
error.__proto__ = FileTooLargeError.prototype
|
|
|
|
return error
|
|
|
|
}
|
|
|
|
FileTooLargeError.prototype.__proto__ = Error.prototype
|
|
|
|
|
2020-05-06 06:09:33 -04:00
|
|
|
module.exports = Errors = {
|
|
|
|
NotFoundError,
|
|
|
|
OpRangeNotAvailableError,
|
|
|
|
ProjectStateChangedError,
|
2021-07-13 07:04:42 -04:00
|
|
|
DeleteMismatchError,
|
2022-07-06 05:50:16 -04:00
|
|
|
FileTooLargeError,
|
2020-05-06 06:09:33 -04:00
|
|
|
}
|