-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception handling #5
Comments
My immediate thought was the same, I think. |
@jeroldhaas I'm thinking something like: let exceptions = Signal.catch someSignal This would result in exceptions being |
But this would require a general mechanism for propagating exceptions through (similar to IObserver's mechanism), as well as the ability to subscribe to them somewhere - perhaps via |
My reasoning for Can subscribers operate in a serial pipeline? To clarify, |
@jeroldhaas The problem with IException is that it won't work against standard exceptions, so a "global" exception handler wouldn't just push into it. That's why I was suggesting There is nothing stopping multiple subscriptions on a "pipeline". I was actually thinking more along the lines of having |
@ReedCopsey I'd looked up the MSDN docs on IException (as I'd thought there was a possibility that it already existed); my idea was to create an interface that would contain the After thinking on your solution, I'm guessing that a guard that checks to see if a special |
@jeroldhaas In most languages on the CLR, all exceptions derive from |
Closing this for now - given the nature of signals (always having a value, etc), this doesn't seem to be a major issue in practice, at least not yet. Going to leave the design alone unless something comes up where this becomes a necessity. |
What would be the preferred method for managing exceptions?
One option would be to go the route of observables, and have Subscription methods accept an error handling function. This would also make it easy to make functions that split a signal into two in the case of an exception - with an IObservable being passed out in the case of an exception for easy handling.
The text was updated successfully, but these errors were encountered: