examplegood first issuerefactor
仓库指标
- 星标
- (12,452 个星标)
- PR 合并指标
- (平均合并 2天 22小时) (30 天内合并 5 个 PR)
描述
You must stop losing the original source stack trace like this (just for example):
it's big trouble, to read exceptions without source stacktraces, especially in crashlytics or sentry like logs
from dart 2.16 you must use Error.throwWithStackTrace like this:
//@dart=2.16
...
} on FirebaseAuthException catch (e, stackTrace) {
Error.throwWithStackTrace(
SignUpWithEmailAndPasswordFailure.fromCode(e.code),
stackTrace,
);
}
also, instead:
} catch (_) {
you must write:
} on Object {
or:
} on Object catch (error, stackTrace) {