You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add api to handle unhandled async rules exceptions (#4727)
* Fixes#4725
Add a new interface IUnhandledAsyncRuleExceptionHandler so a user can inspect and do somethign with exceptions raised by async rules.
* Add docs
* Add missing assignment line.
* Update Source/tests/Csla.test/ValidationRules/AsyncRuleTests.cs
Fix typo
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update Source/Csla/Rules/BusinessRules.cs
Add missing doc
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix typo in class name
* Prevent test hos crash during test
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
[TestMethod($"When an async rule throws an exception the framework must invoke {nameof(IUnhandledAsyncRuleExceptionHandler)}.{nameof(IUnhandledAsyncRuleExceptionHandler.CanHandle)}.")]
[TestMethod($"When an async rules exception can be handled by {nameof(IUnhandledAsyncRuleExceptionHandler)} it must invoke {nameof(IUnhandledAsyncRuleExceptionHandler)}.{nameof(IUnhandledAsyncRuleExceptionHandler.Handle)}.")]
[Ignore("This test can be run but will crash the test host, so this is failing any CI build. But for completness it's here and can be run if necessary.")]
205
+
[TestMethod($"When the default {nameof(IUnhandledAsyncRuleExceptionHandler)} is used the exception must be handled by a global unhandled exception handler (for this test it's the {nameof(AppDomain)}.{nameof(AppDomain.CurrentDomain)}.{nameof(AppDomain.CurrentDomain.UnhandledException)} event).")]
0 commit comments