Hi All,

This is the n-th time I am trying to prevent these exceptions from happening. Something is very wrong in ArgoUML.

How to reproduce: create some modelelements, and then load another small project, you get a javax.jmi.reflect.InvalidObjectException.

The cause is that some event from the model, causes an update of a list in a properties panel, which tries to access a modelelement that has just been removed.

For some reason catch(javax.jmi.reflect.InvalidObjectException) does not work.

Regards,
Michiel




Bob Tarling wrote:
Hi Michiel

What causes such an exception. Shouldn't these be caught where ever
they happen in the model layer and converted to
InvalidElementException?

Bob.

On 4 Jun 2006 13:37:54 -0000, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
User: mvw
Date: 2006-06-04 06:37:54-0700
Log:
 Prevent exceptions when loading a file over a non empty project.

File Changes:

Directory: /argouml/src_new/org/argouml/uml/ui/
===============================================

File [changed]: UMLModelElementListModel2.java
Url: http://argouml.tigris.org/source/browse/argouml/src_new/org/argouml/uml/ui/UMLModelElementListModel2.java?r1=1.44&r2=1.45
Delta lines:  +6 -4
-------------------
--- UMLModelElementListModel2.java 2006-05-23 14:29:57-0700 1.44 +++ UMLModelElementListModel2.java 2006-06-04 06:37:52-0700 1.45
@@ -1,4 +1,4 @@
-// $Id: UMLModelElementListModel2.java,v 1.44 2006/05/23 21:29:57 tfmorris Exp $ +// $Id: UMLModelElementListModel2.java,v 1.45 2006/06/04 13:37:52 mvw Exp $ // Copyright (c) 2002-2006 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
@@ -126,9 +126,11 @@
                 // empty.
                 try {
                     buildModelList();
-                } catch (InvalidElementException exception) {
- LOG.debug("buildModelList threw exception for target " + getTarget()
-                            + exception.getStackTrace()) ;
+                } catch (Exception exception) {
+ /* need to catch javax.jmi.reflect.InvalidObjectException */ + LOG.debug("buildModelList threw exception for target "
+                            + getTarget()
+                            + exception.getStackTrace());
                 } finally {
                     buildingModel = false;
                 }




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to