[kepler-users] Problem with PN director

Vincenzo Forchi vforchi at eso.org
Wed Jun 22 07:18:59 PDT 2011


Now it works!
I actually implemented it like this:

		} catch (TerminateProcessException e) {
			throw e;
		} catch (Exception e) {
			throw new IllegalActionException(this, e, e.getMessage());
		}

Indeed, without the rethrow it would run forever.

Thank you so much, it would have taken me ages to figure it out.

Cheers,
Vincenzo

On 22/06/2011 16:14, Edward A. Lee wrote:
>
> Ah, right. Actually, if you don't rethrow the exception,
> the thread won't terminate...
>
> Edward
>
>
> On 6/22/11 7:02 AM, Colin Enticott wrote:
>> It might be best to re-throw the exception in case the method is
>> expanded on. That is:
>>
>> } catch (Exception e) {
>> if (!(e instanceof TerminateProcessExeption)) {
>> e.printStackTrace();
>> throw new IllegalActionException(this, e, e.getMessage());
>> }
>>
>> else
>>
>> throw e;
>> }


-- 
Vincenzo Forchi    European Southern Observatory
Karl-Schwarzschild-Strasse 2,  D-85748 Garching bei Muenchen,  Germany.
Email: vforchi at eso.org    Tel: +49 89 32006136    Fax: +49 89 3202362



More information about the Kepler-users mailing list