Method ProcessFailureResponse
- Namespace
- Ploch.CommandLine.UseCases
- Assembly
- Ploch.CommandLine.UseCases.dll
ProcessFailureResponse(Result<TUseCaseResponse>)
Renders a failed use case result. Override to customise failure reporting.
protected virtual ExitCode ProcessFailureResponse(Result<TUseCaseResponse> result)
Parameters
resultResult<TUseCaseResponse>The failed result returned by the use case.
Returns
Remarks
Both message collections are rendered. Result.Error fills Errors, while
Result.Invalid fills ValidationErrors and leaves Errors empty - so reading only one
of them makes a whole class of failure arrive on the console with no explanation at all. When both
collections are empty - or carry nothing but whitespace - the status is shown, so the reason after the
label is never blank.