I guess I will have to try that. I can add instructions to my libs saying "If your scripts throw an error, they will be wrapped up in a table with the following params"...
It'll be a bit messy, though. If two libraries follow this convention the errors the user will receive will look like this:
The following error happened:
{
error = {
error = 'the original error',
traceback = 'the trace my user cares about'
},
traceback = '<trace by library 1, the users usually does not care about>'
}
traceback: <trace by library 2, which the user does not care about either'>
With an error(msg, traceback) or an equivalent thing, I would be able to send the user the trace he cares about without all this wrapping and unwrapping.
Regards,
Enrique (@otikik)