| Index: src/org/python/core/Py.java |
| =================================================================== |
| --- src/org/python/core/Py.java (revisión: 5073) |
| +++ src/org/python/core/Py.java (copia de trabajo) |
| @@ -213,6 +213,17 @@ |
| } |
| public static PyObject SystemExit; |
|
fwierzbicki
2008/08/04 13:42:57
We should comment this as being experimental.
|
| + /** |
| + * Jython-specific exception for restarting the interpreter. Currently |
| + * supported only by jython.java, when executing a file (i.e, |
| + * non-interactive mode) |
| + */ |
| + public static PyObject SystemRestart; |
| + public static PyException SystemRestart() { |
| + return new PyException(Py.SystemRestart); |
| + } |
| + |
| + |
| static void maybeSystemExit(PyException exc) { |
| if (Py.matchException(exc, Py.SystemExit)) { |
| PyObject value = exc.value; |
| @@ -705,6 +716,7 @@ |
| BaseException = initExc("BaseException", exc, dict); |
| Exception = initExc("Exception", exc, dict); |
| SystemExit = initExc("SystemExit", exc, dict); |
| + SystemRestart = initExc("SystemRestart", exc, dict); |
| StopIteration = initExc("StopIteration", exc, dict); |
| GeneratorExit = initExc("GeneratorExit", exc, dict); |
| StandardError = initExc("StandardError", exc, dict); |