Print exception hint in the debugger client when an exception is thrown. (#1841)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2017-05-23 16:06:25 +02:00
committed by GitHub
parent 7770b6237a
commit 29f57ec58f
8 changed files with 237 additions and 25 deletions
+3
View File
@@ -1,2 +1,5 @@
c
c
c
c
quit
+14 -1
View File
@@ -2,5 +2,18 @@ Connecting to: localhost:5001
Stopped at tests/debugger/do_exception.js:15
(jerry-debugger) c
Exception throw detected (to disable automatic stop type exception 0)
Stopped at tests/debugger/do_exception.js:19 (in foo() at line:17, col:1)
Exception hint: TypeError
Stopped around tests/debugger/do_exception.js:19 (in foo() at line:17, col:1)
(jerry-debugger) c
Exception throw detected (to disable automatic stop type exception 0)
Exception hint: ReferenceError
Stopped at tests/debugger/do_exception.js:24 (in foo() at line:17, col:1)
(jerry-debugger) c
Exception throw detected (to disable automatic stop type exception 0)
Exception hint: 456
Stopped at tests/debugger/do_exception.js:29 (in foo() at line:17, col:1)
(jerry-debugger) c
Exception throw detected (to disable automatic stop type exception 0)
Exception hint: RangeError: Bad range!
Stopped around tests/debugger/do_exception.js:34 (in foo() at line:17, col:1)
(jerry-debugger) quit
+19 -5
View File
@@ -15,11 +15,25 @@
print("exception handler configuration test")
function foo() {
try {
b = a / c;
} catch (e) {
print(e); // pass exception object to err handler
}
try {
undefined();
} catch (e) {
}
try {
xxx();
} catch (e) {
}
try {
throw 456;
} catch (e) {
}
try {
throw new RangeError("Bad range!");
} catch (e) {
}
}
foo()