Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/ns.q
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@
/ @returns () The results of the function or a dictionary `isError`errorMsg!(`PROT_EXEC_FAILED; theError) if it fails. If running with '.ns.cfg.protectExecWithStack' enabled, `backtrace will also be added as the 2nd element
/ @see .ns.cfg.protectExecWithStack
.ns.protectedExecute:{[func;args]
func:.ns.i.getFunction func;
func:.Q.trp[.ns.i.getFunction; func; { `isError`backtrace`errorMsg!(.ns.const.pExecFailure; .Q.sbt y; x) }];

if[.ns.const.pExecFailure ~ first func;
:func;
];

funcArgCount:count .ns.getFunctionArguments func;

Expand Down