I'm working on it. I'm using this opportunity to clean up all the 
readers' error handling. We have quite a soup. This will standardize 
them all:

readAtomSetCollection() will NOT throw Exception but instead in all 
cases do try/catch with a standardized setError(Exception e) call in the 
catch to set atomSetCollection.errorMessage with an indication of which 
line caused the error. One of these errors might be our out-of-memory 
clone error.

I'm half-way done, and it looks much cleaner now.

Bob



Nicolas Vervelle wrote:

>This is difficult for me to answer on this subject since all my mails to 
>Jmol devs are bounced back ...
>
>I really think there's nothing more to do on this:
>- CloneNotSupportedException will *never* be thrown (whatever version of 
>Java3D we are using)
>- we can't do much about OutOfMemoryException, there's just not enough 
>memory
>
>We can add a Logger.error() call in the catch, but honestly I don't see 
>anything more needed.
>
>Nico
>
>
>Bob Hanson wrote:
>  
>
>>apparently the problem is that different versions of Java throw 
>>different errors. So it might be best to catch this here and pass it on 
>>as a different exception, perhaps JmolCloneAtomException.
>>
>>Is that easy to do?
>>
>>Bob
>>
>>
>>René Kanters wrote:
>>
>>  
>>    
>>
>>>Hi,
>>>
>>>When I use Eclipse and comment out the try/catch clause around around 
>>>the return (Atom)super.clone(), I only get the message the 
>>>the CloneNotSupportedException is not caught. I can not get the 
>>>javadoc for the particular javax.vecmath.Point3f class, so it is hard 
>>>to tell which exceptions could be thrown. When checking the online 
>>>java3d Point3f documentation I see it descends from the Tuple3f and 
>>>that class's clone method only throws a java.lang.OutOfMemoryError 
>>>(and doesn't mention the clone not supported one).
>>>
>>>It seems to me that the safest thing to do is to not catch the 
>>>exception if there is not something useful you can do with it. This 
>>>means that a lot of methods need to have the 'throws ....' added to 
>>>them, but it should make the interface clearer and allow the 'highest 
>>>level' caller, usually the reader (or some symmetry calculation which 
>>>can produce more atoms in an atomset), to be able to figure out that 
>>>something was wrong when the file was read.
>>>
>>>As Miguel points out it can be very dangerous to return a null when 
>>>there really was an 'exceptional' condition in the execution of the 
>>>code, unless you rethrow the exception (but in that case I don't think 
>>>the return value even comes back to the callee....).
>>>
>>>Just my rusty thoughts this subject....
>>>
>>>Cheers,
>>>René
>>>
>>>On Feb 10, 2007, at 7:02 AM, Bob Hanson wrote:
>>>
>>>    
>>>      
>>>
>>>>Thanks, Miguel. Yes, that's very helpful. The context is the copying
>>>>of a coordinate data set for vibrations and such.
>>>>
>>>>Can someone remind me when it is that this error became a problem?
>>>>
>>>>Is it
>>>>
>>>>(a) that certain implementations of Java don't clone our atoms, and
>>>>so were properly throwing this clone exception, or
>>>>
>>>>(b) that we were looking for the wrong exception in those cases, and 
>>>>although
>>>>the exception was never actually thrown, the presence of the try/catch
>>>>was not compiling on those machines?
>>>>
>>>>Bob
>>>>
>>>>
>>>>
>>>>-------------------------------------------------------------------------
>>>>Using Tomcat but need to do more? Need to support web services, security?
>>>>Get stuff done quickly with pre-integrated technology to make your 
>>>>job easier.
>>>>Download IBM WebSphere Application Server v.1.0.1 based on Apache 
>>>>Geronimo
>>>>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 
>>>><http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
>>>>_______________________________________________
>>>>Jmol-developers mailing list
>>>>[email protected] 
>>>><mailto:[email protected]>
>>>>https://lists.sourceforge.net/lists/listinfo/jmol-developers
>>>>      
>>>>        
>>>>
>>>------------------------------------------------------------------------
>>>
>>>-------------------------------------------------------------------------
>>>Using Tomcat but need to do more? Need to support web services, security?
>>>Get stuff done quickly with pre-integrated technology to make your job 
>>>easier.
>>>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>>>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>>>
>>>------------------------------------------------------------------------
>>>
>>>_______________________________________________
>>>Jmol-developers mailing list
>>>[email protected]
>>>https://lists.sourceforge.net/lists/listinfo/jmol-developers
>>> 
>>>
>>>    
>>>      
>>>
>>-------------------------------------------------------------------------
>>Using Tomcat but need to do more? Need to support web services, security?
>>Get stuff done quickly with pre-integrated technology to make your job easier.
>>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>>_______________________________________________
>>Jmol-developers mailing list
>>[email protected]
>>https://lists.sourceforge.net/lists/listinfo/jmol-developers
>>
>>  
>>    
>>
>
>
>-------------------------------------------------------------------------
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job easier.
>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>_______________________________________________
>Jmol-developers mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/jmol-developers
>  
>


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to