UNPKG

@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 1 kB
import { ErrorSerialiser } from '../ErrorSerialiser.js'; import { RuntimeError } from './RuntimeError.js'; /** * Thrown to indicate that an [`Interaction`](https://serenity-js.org/api/core/class/Interaction/), a [`Task`](https://serenity-js.org/api/core/class/Task/) or a test scenario * took longer to execute than the expected timeout. * * @group Errors */ export class TimeoutExpiredError extends RuntimeError { static fromJSON(serialised) { const error = new TimeoutExpiredError(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(TimeoutExpiredError, message, cause); } } //# sourceMappingURL=TimeoutExpiredError.js.map