diff options
author | Kay Ramme <kr@openoffice.org> | 2000-11-17 09:45:40 +0000 |
---|---|---|
committer | Kay Ramme <kr@openoffice.org> | 2000-11-17 09:45:40 +0000 |
commit | e0fbd05c6c24e24876e9e3ec39664a83bcf318d8 (patch) | |
tree | 8ab8f1d59b7b1d3ad08c1bf17fc8df0d67e84b69 /jurt | |
parent | 0ee3adb3442e406c6e9e79e38f27e35e1b591bf8 (diff) |
forward genuine java exceptions to client
Diffstat (limited to 'jurt')
-rw-r--r-- | jurt/com/sun/star/lib/uno/environments/remote/Job.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/jurt/com/sun/star/lib/uno/environments/remote/Job.java b/jurt/com/sun/star/lib/uno/environments/remote/Job.java index 44f8093b52d0..6915cf539d7e 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/Job.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/Job.java @@ -2,9 +2,9 @@ * * $RCSfile: Job.java,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:27:53 $ + * last change: $Author: kr $ $Date: 2000-11-17 10:45:40 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -83,7 +83,7 @@ import com.sun.star.uno.UnoRuntime; * The Job is an abstraction for tasks which have to be done * remotely because of a method invocation. * <p> - * @version $Revision: 1.1.1.1 $ $ $Date: 2000-09-18 15:27:53 $ + * @version $Revision: 1.2 $ $ $Date: 2000-11-17 10:45:40 $ * @author Kay Ramme * @see com.sun.star.lib.uno.environments.remote.ThreadID * @see com.sun.star.lib.uno.environments.remote.IReceiver @@ -190,15 +190,17 @@ public class Job { } while(theException instanceof InvocationTargetException); + // is this an exception we now? if(theException instanceof com.sun.star.uno.Exception || theException instanceof com.sun.star.uno.RuntimeException) { - if(_iMessage.isSynchron()) - _iReceiver.sendReply(true, _iMessage.getThreadID(), theException); if(DEBUG) System.err.println("#### RemoteStub.request - exception:" + theException); } - else - throw (Exception)invocationTargetException.getTargetException(); + else // wrap it as uno exception + theException = new com.sun.star.uno.RuntimeException("java exception: " + theException.toString(), null); + + if(_iMessage.isSynchron()) + _iReceiver.sendReply(true, _iMessage.getThreadID(), theException); } return result; |