mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
Don't assume that a stack overflow is an Error.
A new test captures a stack overflow error and rethrows it. It assumed that it would be a Dart `Error`, but on dartdevk it's not. Now just catches whatever it is and checks that it's the same object again. Bug: http://dartbug.com/47664 Change-Id: I2355ab1b43adf82806b0b76fc26aa5879ddb0d87 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219788 Auto-Submit: Lasse R.H. Nielsen <lrn@google.com> Commit-Queue: Sigmund Cherem <sigmund@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
parent
1edd60da35
commit
62f4712523
|
@ -131,7 +131,7 @@ main() {
|
|||
// Should work with whichever object gets here.
|
||||
try {
|
||||
Error.throwWithStackTrace(error, systemStack);
|
||||
} on Error catch (e, s) {
|
||||
} catch (e, s) {
|
||||
Expect.identical(error, e);
|
||||
Expect.equals("$systemStack", "$s");
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ main() {
|
|||
// Should work with whichever object gets here.
|
||||
try {
|
||||
Error.throwWithStackTrace(error, systemStack);
|
||||
} on Error catch (e, s) {
|
||||
} catch (e, s) {
|
||||
Expect.identical(error, e);
|
||||
Expect.equals("$systemStack", "$s");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue