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