mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
6c853de5d5
* Migrate to new object-persistor module * Support updated persistor module using ES6 classes * Update object-persistor * Upgrade new persistor code to OError3 * Update to latest minor release for outdated packages * Update package hashes to sha512 * Point object-persistor at master branch
30 lines
732 B
JavaScript
30 lines
732 B
JavaScript
const OError = require('@overleaf/o-error')
|
|
const { Errors } = require('@overleaf/object-persistor')
|
|
|
|
class HealthCheckError extends OError {}
|
|
class ConversionsDisabledError extends OError {}
|
|
class ConversionError extends OError {}
|
|
class TimeoutError extends OError {}
|
|
class InvalidParametersError extends OError {}
|
|
|
|
class FailedCommandError extends OError {
|
|
constructor(command, code, stdout, stderr) {
|
|
super('command failed with error exit code', {
|
|
command,
|
|
code
|
|
})
|
|
this.stdout = stdout
|
|
this.stderr = stderr
|
|
this.code = code
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
FailedCommandError,
|
|
ConversionsDisabledError,
|
|
ConversionError,
|
|
HealthCheckError,
|
|
TimeoutError,
|
|
InvalidParametersError,
|
|
...Errors
|
|
}
|