@abaplint/runtime
Version:
Transpiler - Runtime
21 lines • 665 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.throwErrorWithParameters = throwErrorWithParameters;
exports.throwError = throwError;
async function throwErrorWithParameters(name, parameters) {
if (abap.Classes[name] !== undefined) {
throw await new abap.Classes[name]().constructor_(parameters);
}
else {
throw new Error(`Global class ${name} not found`);
}
}
function throwError(name) {
if (abap.Classes[name] !== undefined) {
throw new abap.Classes[name]();
}
else {
throw new Error(`Global class ${name} not found`);
}
}
//# sourceMappingURL=throw_error.js.map