return new PyException(Py.SystemExit, message);
}*/
static void maybeSystemExit(PyException exc) {
//System.err.println("maybeSystemExit: " + exc.type.toString());
if (Py.matchException(exc, Py.SystemExit)) {
throw new ExitScriptException(); //We don't want System.exit to actually be called in PyDev.
// PyObject value = exc.value;
// //System.err.println("exiting: "+value.getClass().getName());
// if (value instanceof PyInstance) {
// PyObject tmp = value.__findattr__("code");
// if (tmp != null)