Signed-off-by: Tomek Grabiec <tgrab...@gmail.com>
---
 jit/exception.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/jit/exception.c b/jit/exception.c
index 4d1b538..2237dbe 100644
--- a/jit/exception.c
+++ b/jit/exception.c
@@ -61,15 +61,23 @@ void thread_init_exceptions(void)
 }
 
 /**
- * signal_exception - used for signaling that exception has occurred in
- *         jato functions.  Exception will be thrown as soon as
- *         controll is returned back to JIT method code.
+ * signal_exception - used for signaling that exception has occurred
+ *         in jato functions. Exception will be thrown as soon as
+ *         controll is returned back to JIT method code. If another
+ *         exception is already signalled no action is done.
  *
  * @exception: exception object to be thrown.
  */
 void signal_exception(struct object *exception)
 {
+       if (getExecEnv()->exception)
+               return;
+
+       if (exception == NULL)
+               die("%s: exception is NULL.", __func__);
+
        getExecEnv()->exception = exception;
+
        exception_guard = exceptions_guard_page;
 }
 
-- 
1.6.0.6


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Jatovm-devel mailing list
Jatovm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Reply via email to