Skip to content

Commit e521079

Browse files
authored
Include stacktrace when dt command fails (#9385)
1 parent 34c2ae7 commit e521079

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tool/bin/dt.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ void main(List<String> args) async {
1616
.whenComplete(sharedStdIn.terminate);
1717

1818
exit(result is int ? result : 0);
19-
} catch (e) {
19+
} catch (e, st) {
2020
if (e is UsageException) {
2121
stderr.writeln('$e');
22+
stderr.writeln(st);
23+
2224
// Return an exit code representing a usage error.
2325
exit(64);
2426
} else {
2527
stderr.writeln('$e');
28+
stderr.writeln(st);
29+
2630
// Return a general failure exit code.
2731
exit(1);
2832
}

0 commit comments

Comments
 (0)