CustomTrace class
StackTrace 문자열을 파싱하여 사용 편의성을 향상시킨 클래스이다. 파일 이름(fileName), 함수 이름(functionName), 호출자 이름(callerFunctionName), 파일 내 라인 넘버(lineNumber), 컬럼 넘버(columnNumber) 등을 얻을 수 있다.
try{
errorGenerator();
} catch(e, s) {
final customTrace = CustomTrace(stackTrace);
print('Error occurred on ${customTrace.fileName}, ${customTrace.functionName}');
}
Constructors
- CustomTrace(StackTrace stackTrace)
Properties
- callerFunctionName → String?
-
no setter
- columnNumber → int
-
no setter
- fileName → String
-
no setter
- functionName → String
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- lineNumber → int
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited