File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
com.ibm.wala.cast.python.jython3/source/com/ibm/wala/cast/python/util Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11package com .ibm .wala .cast .python .util ;
22
3+ import java .util .logging .Level ;
4+ import java .util .logging .Logger ;
35import org .python .core .PyException ;
46import org .python .core .PyObject ;
57import org .python .core .PySystemState ;
68import org .python .util .PythonInterpreter ;
79
810public class Python3Interpreter extends com .ibm .wala .cast .python .util .PythonInterpreter {
911
12+ private static final Logger LOGGER = Logger .getLogger (Python3Interpreter .class .getName ());
13+
1014 private static PythonInterpreter interp ;
1115
1216 public static PythonInterpreter getInterp () {
@@ -24,7 +28,8 @@ public Integer evalAsInteger(String expr) {
2428 return val .asInt ();
2529 }
2630 } catch (PyException e ) {
27-
31+ LOGGER .log (Level .SEVERE , "Unable to interpret Python expression: " + expr , e );
32+ throw new IllegalArgumentException ("Can't interpret Python expression: " + expr + "." , e );
2833 }
2934
3035 return null ;
You can’t perform that action at this time.
0 commit comments