@serenity-js/core
Version:
The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure
26 lines • 944 B
JavaScript
import { ErrorSerialiser } from '../ErrorSerialiser.js';
import { RuntimeError } from './RuntimeError.js';
/**
* Thrown to indicate that a [scheduled operation](https://serenity-js.org/api/core/class/Scheduler/)
* has been stopped before it was completed.
*
* @group Errors
*/
export class OperationInterruptedError extends RuntimeError {
static fromJSON(serialised) {
const error = new OperationInterruptedError(serialised.message, ErrorSerialiser.deserialise(serialised.cause));
error.stack = serialised.stack;
return error;
}
/**
* @param message
* Human-readable description of the error
*
* @param [cause]
* The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
*/
constructor(message, cause) {
super(OperationInterruptedError, message, cause);
}
}
//# sourceMappingURL=OperationInterruptedError.js.map