---------- Forwarded message ----------
From: George H <[email protected]>
Date: Wed, Jun 23, 2010 at 4:34 AM
Subject: Re: [Rxtx] gnu.io.RXTXPort discards exception silently if
initialization fails
To: "[email protected]" <[email protected]>


--
George H
[email protected]



On Wed, Jun 23, 2010 at 11:17 AM, Michael Erskine <[email protected]> wrote:
> On 23 June 2010 06:38, Kustaa Nyholm <[email protected]> wrote:
>>
>>> I did change the code to
>>>                try {
>>>                        z = new Zystem();
>>>                } catch ( Exception e ) {
>>>                        throw new Error(e.toString());
>>>                };
>>
>> Is there a reason why this could/should not be:
>>
>>
>>>                try {
>>>                        z = new Zystem();
>>>                } catch ( Throwable e ) {
>>>                        e.printStackTrace(System.err);
>>>                };
>
> Or even just let the exception bubble up and kill whatever thread
> caused the class to load :)
>
> I vote for the removal of Zystem BTW!
>
> Regards,
> Michael Erskine.


I would prefer that an exception is thrown rather than the stack trace
be printed. If anyone is using loggers then it would be useful to
catch the exception and log it, rather than let it come out in the
error stream where no one might look.
_______________________________________________
Rxtx mailing list
[email protected]
http://mailman.qbang.org/mailman/listinfo/rxtx



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to