throwOut<RT extends Object, ET extends Exception, BET extends Exception> static method
Failure<RT, ET>
throwOut<RT extends Object, ET extends Exception, BET extends Exception>(])
override
RT...return type
ET...exception type
BET...base exception type
exception を throw out させる syntax sugar.
Implementation
static Failure<RT, ET> throwOut<
RT extends Object
,ET extends Exception
,BET extends Exception
>(
BET baseException,
Error error,
[
Log? log,
Map<String, dynamic> monitorOnError = const {},
]
) {
switch (baseException) {
case ET():
return Failure(baseException, log);
case _:
if (log != null) log.monitor(monitorOnError);
Result.panic(error, log);
}
}