Skip to content

Commit

Permalink
Turn includeJavaStackInExceptions on by default as it was always done…
Browse files Browse the repository at this point in the history
… in previous versions.
  • Loading branch information
groves committed Jan 21, 2009
1 parent 1d090a5 commit 51d6144
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/org/python/compiler/JavaMaker.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,12 @@ public void addProxy() throws Exception {
super.addProxy();

// _initProxy method
Code code = classfile.addMethod("__initProxy__",
"([Ljava/lang/Object;)V", Modifier.PUBLIC);
Code code = classfile.addMethod("__initProxy__", "([Ljava/lang/Object;)V", Modifier.PUBLIC);

code.visitVarInsn(ALOAD, 0);
code.visitLdcInsn(pythonModule);
code.visitLdcInsn(pythonClass);

code.visitVarInsn(ALOAD, 1);
code.visitMethodInsn(INVOKESTATIC, "org/python/core/Py", "initProxy", "(" + $pyProxy + $str + $str + $objArr + ")V");
code.visitInsn(RETURN);
Expand Down
4 changes: 2 additions & 2 deletions src/org/python/core/Options.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class Options {
* trace in addition to the Python traceback. This can slow raising
* considerably.
*/
public static boolean includeJavaStackInExceptions = false;
public static boolean includeJavaStackInExceptions = true;

/**
* When true, python exception raised in overridden methods will be shown on
Expand Down Expand Up @@ -63,7 +63,7 @@ public class Options {
* A directory where the dynamically generated classes are written. Nothing is
* ever read from here, it is only for debugging purposes.
*/
public static String proxyDebugDirectory = null;
public static String proxyDebugDirectory;

/**
* If true, Jython will use the first module found on sys.path where java
Expand Down
8 changes: 4 additions & 4 deletions src/org/python/util/jython.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.io.InputStream;
import java.nio.charset.Charset;
import java.util.List;
import java.util.Properties;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

Expand Down Expand Up @@ -131,8 +132,7 @@ public static void run(String[] args) {
}

// Setup the basic python system state from these options
PySystemState.initialize(PySystemState.getBaseProperties(),
opts.properties, opts.argv);
PySystemState.initialize(PySystemState.getBaseProperties(), opts.properties, opts.argv);

// Now create an interpreter
InteractiveConsole interp = newInterpreter();
Expand Down Expand Up @@ -339,7 +339,7 @@ class CommandLineOptions
public boolean fixInteractive;
public boolean help, version;
public String[] argv;
public java.util.Properties properties;
public Properties properties;
public String command;
public List<String> warnoptions = Generic.list();
public String encoding;
Expand All @@ -351,7 +351,7 @@ public CommandLineOptions() {
jar = fixInteractive = false;
interactive = notice = true;
runModule = false;
properties = new java.util.Properties();
properties = new Properties();
help = version = false;
}

Expand Down

0 comments on commit 51d6144

Please sign in to comment.