2019-12-18 05:01:59 -05:00
|
|
|
const OError = require('@overleaf/o-error')
|
|
|
|
|
2020-04-30 08:20:40 -04:00
|
|
|
class NotFoundError extends OError {}
|
|
|
|
class WriteError extends OError {}
|
|
|
|
class ReadError extends OError {}
|
|
|
|
class HealthCheckError extends OError {}
|
|
|
|
class ConversionsDisabledError extends OError {}
|
|
|
|
class ConversionError extends OError {}
|
|
|
|
class SettingsError extends OError {}
|
|
|
|
class TimeoutError extends OError {}
|
|
|
|
class InvalidParametersError extends OError {}
|
2019-12-18 05:01:59 -05:00
|
|
|
|
|
|
|
class FailedCommandError extends OError {
|
|
|
|
constructor(command, code, stdout, stderr) {
|
2020-04-30 08:20:40 -04:00
|
|
|
super('command failed with error exit code', {
|
|
|
|
command,
|
|
|
|
code
|
2019-12-18 05:01:59 -05:00
|
|
|
})
|
|
|
|
this.stdout = stdout
|
|
|
|
this.stderr = stderr
|
|
|
|
this.code = code
|
|
|
|
}
|
2019-12-16 05:42:31 -05:00
|
|
|
}
|
2015-08-31 11:47:16 -04:00
|
|
|
|
2019-12-18 10:40:30 -05:00
|
|
|
module.exports = {
|
|
|
|
NotFoundError,
|
|
|
|
FailedCommandError,
|
|
|
|
ConversionsDisabledError,
|
|
|
|
WriteError,
|
|
|
|
ReadError,
|
2019-12-19 10:36:48 -05:00
|
|
|
ConversionError,
|
2020-01-07 05:24:46 -05:00
|
|
|
HealthCheckError,
|
2020-01-07 16:19:26 -05:00
|
|
|
SettingsError,
|
2020-03-16 07:35:01 -04:00
|
|
|
TimeoutError,
|
|
|
|
InvalidParametersError
|
2019-12-18 10:40:30 -05:00
|
|
|
}
|