alexmojaki / pyodide-worker-runner

MIT License
23 stars 2 forks source link

Handling errors while installing imports #13

Closed winniederidder closed 2 years ago

winniederidder commented 2 years ago

After some experimenting, I figured we might want to add some sort of error handling to install_imports. Now that it uses messages, we might want to use a message to indicate a package failed to import. I'm not entirely sure yet how it should look, as being able to translate the error using FriendlyTraceback is also useful. Maybe we send a message and then re-raise the Exception?

winniederidder commented 2 years ago

@alexmojaki Thoughts on this? Shall I open a PR with my described solution?

alexmojaki commented 2 years ago

It's not clear to me why you'd want this or how it would be helpful since an error is raised anyway. But if you think it's useful, go ahead and open a PR.

winniederidder commented 2 years ago

Well, the idea is to make handling the error easier. However, it is easy enough to work around it myself by adding better handling of the error raised. Closed by https://github.com/dodona-edu/papyros/pull/219.