Closed stuhlmueller closed 8 years ago
The editor shows a readable error message for code that calls this function:
window.foo = function() { throw new Error('foo') };
However, it doesn't show any message for code that calls this function:
window.bar = function() { throw 'bar' };
In various places in webppl (and probably also in its dependencies), errors are thrown as strings, so it's important to handle this case.
Added in 95236b9
We should make every effort inside of webppl to throw proper errors, though, so that we keep stack information.
The editor shows a readable error message for code that calls this function:
However, it doesn't show any message for code that calls this function:
In various places in webppl (and probably also in its dependencies), errors are thrown as strings, so it's important to handle this case.