jakarta-bsf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From orlikow...@apache.org
Subject cvs commit: jakarta-bsf/src/org/apache/bsf/engines/jython JythonEngine.java
Date Mon, 26 Apr 2004 17:42:33 GMT
orlikowski    2004/04/26 10:42:33

  Modified:    src/org/apache/bsf/engines/jython JythonEngine.java
  Log:
  A couple of fixups to the Jython engine.
  
  Revision  Changes    Path
  1.5       +8 -4      jakarta-bsf/src/org/apache/bsf/engines/jython/JythonEngine.java
  
  Index: JythonEngine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-bsf/src/org/apache/bsf/engines/jython/JythonEngine.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JythonEngine.java	4 Nov 2003 07:55:44 -0000	1.4
  +++ JythonEngine.java	26 Apr 2004 17:42:33 -0000	1.5
  @@ -142,7 +142,7 @@
             return result;
         } catch (PyException e) {
             throw new BSFException (BSFException.REASON_EXECUTION_ERROR,
  -                                  "exception from Jython: " + e, e);
  +                                  "exception from Jython:\n" + e, e);
         }
     }
   
  @@ -158,7 +158,7 @@
   	  return result;
   	} catch (PyException e) {
   	  throw new BSFException (BSFException.REASON_EXECUTION_ERROR,
  -			      "exception from Jython: " + e, e);
  +			      "exception from Jython:\n" + e, e);
   	}
     }
   
  @@ -171,7 +171,7 @@
   	  interp.exec (byteify(script.toString ()));
   	} catch (PyException e) {
   	  throw new BSFException (BSFException.REASON_EXECUTION_ERROR,
  -			      "exception from Jython: " + e, e);
  +			      "exception from Jython:\n" + e, e);
   	}
     }
   
  @@ -195,7 +195,7 @@
         } catch (PyException e) {
             interp.resetbuffer();
             throw new BSFException(BSFException.REASON_EXECUTION_ERROR, 
  -                                 "exception from Jython: " + e, e);
  +                                 "exception from Jython:\n" + e, e);
         }
     }
   
  @@ -209,6 +209,10 @@
   	// create an interpreter
   	interp = new BSFPythonInterpreter ();
   
  +    // ensure that output and error streams are re-directed correctly
  +    interp.setOut(System.out);
  +    interp.setErr(System.err);
  +    
   	// register the mgr with object name "bsf"
   	interp.set ("bsf", new BSFFunctions (mgr, this));
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: bsf-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bsf-dev-help@jakarta.apache.org


Mime
View raw message