2019-12-18 05:01:59 -05:00
|
|
|
const OError = require('@overleaf/o-error')
|
2020-07-07 08:49:54 -04:00
|
|
|
const { Errors } = require('@overleaf/object-persistor')
|
2019-12-18 05:01:59 -05:00
|
|
|
|
2020-04-30 08:20:40 -04:00
|
|
|
class HealthCheckError extends OError {}
|
|
|
|
class ConversionsDisabledError extends OError {}
|
|
|
|
class ConversionError 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,
|
2021-07-13 07:04:46 -04:00
|
|
|
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 = {
|
|
|
|
FailedCommandError,
|
|
|
|
ConversionsDisabledError,
|
2019-12-19 10:36:48 -05:00
|
|
|
ConversionError,
|
2020-01-07 05:24:46 -05:00
|
|
|
HealthCheckError,
|
2020-03-16 07:35:01 -04:00
|
|
|
TimeoutError,
|
2020-07-07 08:49:54 -04:00
|
|
|
InvalidParametersError,
|
2021-07-13 07:04:46 -04:00
|
|
|
...Errors,
|
2019-12-18 10:40:30 -05:00
|
|
|
}
|