Class UnityFailureListener
Provides default IFailureListener functionality for Unity, by logging failures. Unity doesn't handle exceptions in coroutines very well in tests (one of the motivations to write Responsible), so we also log failures to ensure they are visible.
Implements
Namespace: Responsible.Unity
Assembly: Responsible.dll
Syntax
public class UnityFailureListener : IFailureListener
Methods
OperationFailed(Exception, string)
Will log the failure message as a warning, if it was caused by an unhandled log message, or as an error, if it was caused by any other error.
Declaration
public void OperationFailed(Exception exception, string failureMessage)
Parameters
Type | Name | Description |
---|---|---|
Exception | exception | Exception that caused the failure. |
string | failureMessage | Message detailing the failure, including the state of the operation. |