Configuration
Logging
MonadOptions.Configure(options => options.UseExceptionLogger((ex) => {
Console.WriteLine(ex); // replace with your logger's log method
}));Error Code Generation
public class MyErrorCodeFactory : ErrorCodeFactory
{
public override ErrorCode FromEnum(Enum @enum)
{
// your implementation
}
public override ErrorCode FromException(Exception exception)
{
// your implementation
}
}
MonadOptions.Configure(options => options.UseErrorCodeFactory(new MyErrorCodeFactory()));Error Code and Message Fallbacks
Last updated
Was this helpful?