xaya / libxayagame

MIT License
21 stars 19 forks source link

Clearer error reporting for exceptions thrown from GSP code #125

Open domob1812 opened 1 year ago

domob1812 commented 1 year ago

When the GSP logic throws exceptions, those will be caught in the ZMQ listener loop. The error handler there is meant more for retryable things like RPC errors, and the error reporting might be confusing to GSP developers trying to debug the issue.

We could potentially directly wrap the GSP callbacks with an exception handler, and provide more direct error reporting (plus potentially crash the process) if the callback throws anything back up. Note though that in some cases it might be desired to handle errors from GSP code back up in the ZMQ listener, e.g. if the GSP uses its own RPC connections in the update logic.