Skip to content

Commit

Permalink
Fix stacktrace in console handler
Browse files Browse the repository at this point in the history
  • Loading branch information
MilovdZee committed Dec 17, 2023
1 parent 48be104 commit 4ecb2dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/handlers/console_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ConsoleHandler extends ReportHandler {
..info('${report.error}')
..info('');
if (enableStackTrace) {
_printStackTraceFormatted(report.stackTrace as StackTrace?);
_printStackTraceFormatted(report.stackTrace);
}
if (enableCustomParameters) {
_printCustomParametersFormatted(report.customParameters);
Expand Down Expand Up @@ -75,9 +75,9 @@ class ConsoleHandler extends ReportHandler {
}
}

void _printStackTraceFormatted(StackTrace? stackTrace) {
void _printStackTraceFormatted(stackTrace) {
logger.info('------- STACK TRACE -------');
stackTrace.toString().split('\n').forEach((entry) => logger.info(entry));
stackTrace?.toString().split('\n').forEach((entry) => logger.info(entry));
}

@override
Expand Down

0 comments on commit 4ecb2dc

Please sign in to comment.