Repository navigation
Commit 0a2fe02
committed
Raise the compile() unrecognised-flags error with its message
checkFlags called PRaiseNode.raiseStatic(this, ValueError, null,
NO_VALUE, UNRECOGNIZED_FLAGS, EMPTY_OBJECT_ARRAY), mirroring the
argument order of the old internal execute(). No public overload takes
those arguments, so the call bound to raiseStatic(Node, type, message,
Object...) with a null message and the intended message as a format
argument. The ValueError could be caught, but str(), repr() or .args on
it formatted the null message and threw a Java NullPointerException.
Use the message overload, as checkOptimize next to it does. CPython
raises ValueError("compile(): unrecognised flags").
Signed-off-by: Jeongseop Lim <jeongseop_lim@korea.ac.kr>1 parent 7e7182b commit 0a2fe02
2 files changed
Lines changed: 10 additions & 1 deletion
File tree
- graalpython
- com.oracle.graal.python.test/src/tests
- com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1143 | 1143 | | |
1144 | 1144 | | |
1145 | 1145 | | |
1146 | | - | |
| 1146 | + | |
1147 | 1147 | | |
1148 | 1148 | | |
1149 | 1149 | | |
| |||
0 commit comments