SampleException<T> class

Depend on Exception, SemiException provide a model, which is contains basic data for handling error and exception.

Implemented types

Constructors

SampleException(String errorCode, {String? message, String? debugMessage, dynamic error, StackTrace? stackTrace, DateTime? time})
if error is SampleException, it will not be generate again

Properties

debugMessage String?
Log the message for debug of this exception
latefinal
error ↔ T?
The source error or exception
latefinal
errorCode String
no setter
hashCode int
The hash code for this object.
no setteroverride
message String?
Log the message of this exception
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace?
The stackTrace
latefinal
time DateTime?
The time, when exception occurs
latefinal
tree SampleException?
Exception tree
latefinal

Methods

baseError() SampleException
get the first exception in tree
checkBaseError<E extends SampleException>([String? errorCode]) bool
return true if the first exception in tree same errorCode
containsError<E extends SampleException>([String? errorCode]) bool
return true if the same errorCode which match first
copyWith({String? errorCode, String? message, String? debugMessage, T? error, StackTrace? stackTrace, DateTime? time}) SampleException<T>
return a SampleException clone
getMessage() String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
print({bool debugMode = true}) → void
Log to console this exception
toString() String
A string representation of this object.
override
whereError<E extends SampleException>([String? errorCode]) SampleException?
get any exception in tree which is first match errorCode

Operators

operator ==(Object other) bool
The equality operator.
override