ResultExtensionsErr(String, String, Exception) Method
Creates a result as the Err variant; with the given error information:
errorMessage,
when,
exception.
static Res PutItem(Item item)
{
try
{
PutItemToDatabase(item);
return Ok();
}
catch (Exception e)
{
return Err("failed to execute sql command.", nameof(PutItem), e);
}
}
Namespace: Orx.Fun.ResultAssembly: Orx.Fun.Result (in Orx.Fun.Result.dll) Version: 1.3.0+344c8bdd6f720ccfb2d8db7c61b76cf02be18f5f
public static Res Err(
string errorMessage,
string when,
Exception exception
)
- errorMessage String
- Error message.
- when String
- Operation when the error is observed.
- exception Exception
- Exception causing the error.
Res