checkBaseError<E extends SampleException> method
return true if the first exception in tree same errorCode
Implementation
core.bool checkBaseError<E extends SampleException>([String? errorCode]) {
final base = baseError();
if (errorCode != null) {
return base.errorCode == errorCode && base is E;
} else {
return base is E;
}
}