-
Bug
-
Resolution: Fixed
-
P3
-
8u20
-
None
-
b39
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085767 | emb-9 | Hannes Wallnoefer | P3 | Resolved | Fixed | team |
JDK-8064267 | 8u45 | Hannes Wallnoefer | P3 | Resolved | Fixed | b01 |
JDK-8062673 | 8u40 | Hannes Wallnoefer | P3 | Resolved | Fixed | b13 |
JDK-8070504 | emb-8u47 | Hannes Wallnoefer | P3 | Resolved | Fixed | team |
The code to use the existing exception in ECMAException.create will use an inherited nashornException property, causing catch clauses to be executed with the prototype object instead of the actual thrown object.
Code to reproduce:
function CustomError() {}
CustomError.prototype = new Error();
var c = new CustomError();
try {
throw c;
} catch (e) {
print(e === c);
print(e === CustomError.prototype);
}
Code to reproduce:
function CustomError() {}
CustomError.prototype = new Error();
var c = new CustomError();
try {
throw c;
} catch (e) {
print(e === c);
print(e === CustomError.prototype);
}
- backported by
-
JDK-8062673 Throwing object with error prototype causes error proto to be caught
-
- Resolved
-
-
JDK-8064267 Throwing object with error prototype causes error proto to be caught
-
- Resolved
-
-
JDK-8070504 Throwing object with error prototype causes error proto to be caught
-
- Resolved
-
-
JDK-8085767 Throwing object with error prototype causes error proto to be caught
-
- Resolved
-