surrogate
Version:
Object method hooks made easy
24 lines (18 loc) • 914 B
JavaScript
import {ErrorProvider as $bJFUx$ErrorProvider} from "./surrogate.7156328e.js";
import {RecoverableRule as $93dab2273f477ac3$export$77a30a1c4c68ceb} from "./surrogate.40a6c999.js";
class $ccec5a64f758c3e5$export$99ee7180506e18e4 extends (0, $93dab2273f477ac3$export$77a30a1c4c68ceb) {
shouldRun() {
return Boolean(this.nextOptions.error);
}
run(node) {
const { options: options } = node.container;
const { error: error, using: using } = this.nextOptions;
const provider = new (0, $bJFUx$ErrorProvider)(node, using, error);
const shouldRecover = this.attemptRecovery(provider, options.runOnError, node.useContext);
shouldRecover ? this.recover(node, {
error: null
}) : node.controller.handleError(node, error);
}
}
export {$ccec5a64f758c3e5$export$99ee7180506e18e4 as ErrorRule};
//# sourceMappingURL=surrogate.07292b5a.js.map