handleError method
Handle exception which is thrown from mapping event-state process.
Implementation
@protected
@mustCallSuper
void handleError(Exception exception, {String? tag}) {
if (exception is KntException) {
if (needLog) {
logger.e('❌❌ KntException: $exception ❌❌');
}
add(
BaseErrorEvent(
exception: exception,
tag: tag,
),
);
return;
}
if (needLog) {
logger.e('❌❌ Error: $exception ❌❌');
}
add(
BaseErrorEvent(
exception: convertedException(exception),
tag: tag,
),
);
}