virto-network / valor

Create HTTP APIs with a plugin system that runs in the server and the browser.
GNU General Public License v3.0
10 stars 8 forks source link

Handle plugin panics gracefully #28

Open olanod opened 3 years ago

olanod commented 3 years ago

Currently a panic in a plugin crashes the whole program. We need some sort of supervisor that can handle a panic in a macro and return an error response instead.

I'm not sure if one can wrap a function that panics and handle the panic or if it has to be done for the whole thread which would mean there would need to be a thread for request handling that should be restarted reloading the relevant plugins.