logger
logger copied to clipboard
Why is StackTrace null-safe?
The standard
try {
...
}
catch (e, s) {
logger.e(e, s);
}
now throws
Error: Invalid argument(s): Error parameter cannot take a StackTrace! at Object.throw_ [as throw] (http://localhost:5555/dart_sdk.js:5032:11) at logger.Logger.new.log (http://localhost:5555/packages/logger/src/log_filter.dart.lib.js:668:19)
Because dart throws StackTrace, not StackTrace?
You just missing message param, logger.e('msg',e,s)
. And !
here is not a null-check operator, just an usual exclamation mark.