Nice/src/bossa/syntax compilation.nice,1.7,1.8

Daniel Bonniot <[email protected]> Sat, 26 Mar 2005 15:33:04 +0000
Newsgroups gmane.comp.lang.nice.cvs
Message-ID <[email protected]>
Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11173/src/bossa/syntax

Modified Files:
	compilation.nice 
Log Message:
Exit the JVM with exit code 1 when the main program finishes with an uncaught
exception.


Index: compilation.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/compilation.nice,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** compilation.nice	25 Mar 2005 16:40:00 -0000	1.7
--- compilation.nice	26 Mar 2005 15:33:02 -0000	1.8
***************
*** 84,95 ****
    res.setCatchClauses(c);
  
!   gnu.bytecode.Method print = gnu.bytecode.ClassType.make("nice.lang.dispatch").
!       addMethod("printStackTraceWithSourceInfo", 
                  gnu.bytecode.Access.PUBLIC | gnu.bytecode.Access.STATIC,
                  [cast(gnu.bytecode.Type.throwable_type)],
                  gnu.bytecode.Type.void_type);
  
!   c.setBody(new gnu.expr.ApplyExp(new gnu.expr.PrimProcedure(print),
!         [new gnu.expr.ReferenceExp(c.getDeclaration())]));
  
    return res;
--- 84,102 ----
    res.setCatchClauses(c);
  
!   let print = gnu.bytecode.ClassType.make("nice.lang.dispatch").
!       addMethod("printStackTraceWithSourceInfo",
                  gnu.bytecode.Access.PUBLIC | gnu.bytecode.Access.STATIC,
                  [cast(gnu.bytecode.Type.throwable_type)],
                  gnu.bytecode.Type.void_type);
  
!   let exit = gnu.bytecode.ClassType.make("java.lang.System").
!     getDeclaredMethod("exit", 1);
! 
!   c.setBody(new gnu.expr.BeginExp
!     ([new gnu.expr.ApplyExp(print,
!         [new gnu.expr.ReferenceExp(c.getDeclaration())]),
!       new gnu.expr.ApplyExp(exit,
!         [new gnu.expr.QuoteExp(new Integer(1))])
!      ]));
  
    return res;



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click