I try to build some kind of X++ script executor and therefore play around with the runbuf function. It works as long as the X++ code I pass in is valid, but when I pass invalid code then it just throws an error that it is not able to compile the code but no further details. For example when I try the following code
runbuf('void dynAdd(int lhs, int rhs) { return lhs + rhs; }');
it fails with the error
Unable to compile "void dynAdd(int lhs, int rhs) { return lhs + rhs; }".
Is there a way to get more information about the error?
Thanks in advance