UsageOutputHandler constructor
UsageOutputHandler({
- OutputSinks sinks = const OutputSinks(),
- UsageSettings usageSettings = const UsageSettings(),
- UsageExceptionSettings exceptionSettings = const UsageExceptionSettings(),
- Iterable<
UsageExceptionHandler> ? addExceptionHandlers,
The provided exception handlers are added before the standard exception handlers.
The handler keeps its own growable copy of that list, so addUsageExceptionHandler works on every instance, including one constructed with no handlers.
Implementation
UsageOutputHandler({
this.sinks = const OutputSinks(),
this.usageSettings = const UsageSettings(),
this.exceptionSettings = const UsageExceptionSettings(),
final Iterable<UsageExceptionHandler>? addExceptionHandlers,
}) : _standardExceptionHandler = standardUsageExceptionHandler,
_additionalExceptionHandlers = List.of(
addExceptionHandlers ?? const <UsageExceptionHandler>[],
);