import Bluebird from"../../deps/bluebird_fork.js";import{GenericActivityError,UnspecifiedError}from"../../Errors.js";import{validation}from"../../Validation.js";class Throw{execute(r){var e=validation.string("code",r.code,void 0),i=validation.string("message",r.message,void 0);if(void 0!==e||void 0!==i)return Bluebird.reject(new GenericActivityError(e,i));r=r.error;return"object"==typeof r&&null!==r?Bluebird.reject(r):Bluebird.reject(new UnspecifiedError)}}Throw.action="gcx:wf:core::Throw",Throw.suite="gcx:wf:builtin";export{Throw};