Skip to content

Commit

Permalink
Perlito5 - cpan - prepare v9.022 - cleanup debugging code
Browse files Browse the repository at this point in the history
  • Loading branch information
fglock committed May 13, 2017
1 parent e2cdc2c commit dac2f29
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 20 deletions.
28 changes: 18 additions & 10 deletions perlito5.pl
Original file line number Diff line number Diff line change
Expand Up @@ -22260,7 +22260,7 @@
throw(e);
}
catch(Exception e) {
e.printStackTrace();
// e.printStackTrace();
String message = e.getMessage();
// System.out.println("Exception in eval_string: " + message);
PlV.sset("main::@", new PlString(message));
Expand Down Expand Up @@ -22306,7 +22306,7 @@
// System.out.println("eval_string: constants \\n[[[ " + constants + " ]]");
}
catch(Exception e) {
e.printStackTrace();
// e.printStackTrace();
String message = e.getMessage();
// System.out.println("Exception in eval_string: " + message);
PlV.sset("main::@", new PlString(message));
Expand Down Expand Up @@ -22355,13 +22355,21 @@
source5.append(" catch(PlReturnException e) {\\n");
source5.append(" return e.ret;\\n");
source5.append(" }\\n");

// TODO - get error details before returning
// source5.append(" catch(Exception e) {\\n");
// source5.append(" e.printStackTrace();\\n");
// source5.append(" throw(e);\\n");
// source5.append(" }\\n");

source5.append(" catch(PlNextException e) {\\n");
source5.append(" throw(e);\\n");
source5.append(" }\\n");
source5.append(" catch(PlLastException e) {\\n");
source5.append(" throw(e);\\n");
source5.append(" }\\n");
source5.append(" catch(PlRedoException e) {\\n");
source5.append(" throw(e);\\n");
source5.append(" }\\n");
source5.append(" catch(Exception e) {\\n");
source5.append(" e.printStackTrace();\\n");
source5.append(" String message = e.getMessage();\\n");
source5.append(" PlV.sset(\\"main::@\\", new PlString(message));\\n");
source5.append(" return PerlOp.context(want);\\n");
source5.append(" }\\n");
source5.append(" }\\n");
source5.append("}\\n");
String cls5 = source5.toString();
Expand Down Expand Up @@ -22390,7 +22398,7 @@
throw(e);
}
catch(Exception e) {
e.printStackTrace();
// e.printStackTrace();
String message = e.getMessage();
// System.out.println("Exception in eval_string: " + message);
PlV.sset("main::@", new PlString(message));
Expand Down
28 changes: 18 additions & 10 deletions src5/lib/Perlito5/Java/JavaCompiler.pm
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class PlJavaCompiler {
throw(e);
}
catch(Exception e) {
e.printStackTrace();
// e.printStackTrace();
String message = e.getMessage();
// System.out.println("Exception in eval_string: " + message);
PlV.sset("main::@", new PlString(message));
Expand Down Expand Up @@ -180,7 +180,7 @@ class PlJavaCompiler {
// System.out.println("eval_string: constants \n[[[ " + constants + " ]]");
}
catch(Exception e) {
e.printStackTrace();
// e.printStackTrace();
String message = e.getMessage();
// System.out.println("Exception in eval_string: " + message);
PlV.sset("main::@", new PlString(message));
Expand Down Expand Up @@ -229,13 +229,21 @@ class PlJavaCompiler {
source5.append(" catch(PlReturnException e) {\n");
source5.append(" return e.ret;\n");
source5.append(" }\n");
// TODO - get error details before returning
// source5.append(" catch(Exception e) {\n");
// source5.append(" e.printStackTrace();\n");
// source5.append(" throw(e);\n");
// source5.append(" }\n");
source5.append(" catch(PlNextException e) {\n");
source5.append(" throw(e);\n");
source5.append(" }\n");
source5.append(" catch(PlLastException e) {\n");
source5.append(" throw(e);\n");
source5.append(" }\n");
source5.append(" catch(PlRedoException e) {\n");
source5.append(" throw(e);\n");
source5.append(" }\n");
source5.append(" catch(Exception e) {\n");
source5.append(" e.printStackTrace();\n");
source5.append(" String message = e.getMessage();\n");
source5.append(" PlV.sset(\"main::@\", new PlString(message));\n");
source5.append(" return PerlOp.context(want);\n");
source5.append(" }\n");
source5.append(" }\n");
source5.append("}\n");
String cls5 = source5.toString();
Expand Down Expand Up @@ -264,7 +272,7 @@ class PlJavaCompiler {
throw(e);
}
catch(Exception e) {
e.printStackTrace();
// e.printStackTrace();
String message = e.getMessage();
// System.out.println("Exception in eval_string: " + message);
PlV.sset("main::@", new PlString(message));
Expand Down

0 comments on commit dac2f29

Please sign in to comment.