Disposal should not throw exceptions

Disposal functions should not throw an exception, for the same reason that subscriptions should not throw exceptions: Since disposal may happen at any time during runtime, if a disposal function throws an exception, then the whole program stops. Unfortunately, unlike subscriptions, it is not possible to notify an error during disposal; the observer is already unsubscribed when the disposal function is called, and the disposal function does not return a value. So, the error can be silently handled in these cases, preferably logged to avoid losing it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.84.169