forked from facebook/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbreak-uncaught.js
More file actions
28 lines (23 loc) · 832 Bytes
/
break-uncaught.js
File metadata and controls
28 lines (23 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// RUN: (! %hdb %s --break-at-start < %s.debug 2>&1) | %FileCheck --match-full-lines %s
// REQUIRES: debugger
// CHECK: Continuing execution
try { throw new Error('asdf') } catch (e) { print('caught', e); }
// CHECK-NEXT: caught Error: asdf
function foo() {
throw new Error('asdf');
}
foo();
// CHECK-NEXT: Break on exception in foo: {{.*}}:17:3
// CHECK-NEXT: > 0: foo: {{.*}}:17:3
// CHECK-NEXT: 1: global: {{.*}}:19:4
// CHECK-NEXT: Continuing execution
// CHECK-NEXT: JavaScript terminated via uncaught exception: asdf
// CHECK: Error: asdf
// CHECK-NEXT: at foo ({{.*}}:17:18)
// CHECK-NEXT: at global ({{.*}}:19:4)