BuglyException.withSession constructor
BuglyException.withSession(
- ExceptionType type,
- Object exception,
- StackTrace? stackTrace
构造携带 session 信息的异常
Implementation
factory BuglyException.withSession(ExceptionType type, Object exception, StackTrace? stackTrace) {
BuglyException buglyException = BuglyException(type, exception, stackTrace);
buglyException.pageName = AppSession.instance.currentPageName ?? 'unknown';
buglyException.sessionId = AppSession.instance.sessionId;
buglyException.sessionTimestamp = AppSession.instance.enterTimestamp;
buglyException.occurTime = new DateTime.now().millisecondsSinceEpoch;
buglyException.thread = Isolate.current.debugName;
return buglyException;
}