Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(20)

Unified Diff: src/org/python/core/Py.java

Issue 2810: SystemRestart exception to restart the interpreter (Closed) SVN Base: https://jython.svn.sourceforge.net/svnroot/jython/branches/asm
Patch Set: Created 1 year, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side by-side-diff with in-line comments
Download patch
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);

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r497