CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CD-adapco (http://www.cfd-online.com/Forums/cd-adapco/)
-   -   Float error stop on it (http://www.cfd-online.com/Forums/cd-adapco/56969-float-error-stop.html)

bastien January 26, 2009 06:11

Float error stop on it
 
Hi,

I am using starccm++ for simulating some stuff. I made a jave program, but unfortunatly when something go bad like for instance float error it open a windows and interface is stuck.

How can I test for error and break in cas of error?

Regards

Bastien

Ola January 27, 2009 06:15

Re: Float error stop on it
 
Hi Bastien!

You could debug your code using a try, catch and finally block. Put your snippet into a try{} block, if the code throws an exception you can handle it using a catch block. A finally{} block is always executed no matter if the code inside the try{} block throws an exception or not, in here you can do essential clean up to allow the code to continue.

Hope this helps, Ola



All times are GMT -4. The time now is 13:31.