Sometimes, I let the user of a script write down their own roll expressions (such as 1d6+2) and then let roll20 evaluate them through sendChat. The issue is, that if the expression is wrong (as in 3+a), then the sandbox will crash. I would rather send an error message and keep the sandbox running. What is the best way to catch such errors? For the record, with expression 3+a, I get Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again. More info... For reference, the error message generated was: Could not determine result type of: [{"type":"M","expr":3},{"type":"C","text":"+a"}]
undefined