---------- Forwarded message ----------
From: Steffen DETTMER <steffen.dett...@ingenico.com>
Date: Wed, Jun 23, 2010 at 12:35 PM
Subject: Re: [Rxtx] gnu.io.RXTXPort discards exception silently if
initialization fails
To: r...@qbang.org


* Kustaa Nyholm wrote on Wed, Jun 23, 2010 at 12:55 +0300:
> > Wouldn't it be better to store the exception in a member and
> > throw it when needing Zystem (e.g. in new or open)
>
> I'm of the fail-fast school of thought so I think it should be
> reported and re-thrown as it happens, not later.

Ahh yes, I agree, in general it is much better to fail quick,
loud and verbosely, right!

However, if this is a static { } block, AFAIK it is not defined
when it will be executed (Before application start? Or later,
when loading the class later? Or when using it first time?).

If the exception would be thrown before main() is called, I think
it is difficult to catch it. I think some general global hook
must be used to do so.

Simpler to handle, if it is thrown when invocating some function,
then it can be caught by try { } catch.
(or am I wrong or outdated?)

oki,

Steffen




About Ingenico: Ingenico is a leading provider of payment solutions,
with over 15 million terminals deployed in more than 125 countries.
Its 2,850 employees worldwide support retailers, banks and service
providers to optimize and secure their electronic payments solutions,
develop their offer of services and increase their point of sales
revenue. More information on http://www.ingenico.com/.
 This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.
 P Please consider the environment before printing this e-mail


_______________________________________________
Rxtx mailing list
r...@qbang.org
http://mailman.qbang.org/mailman/listinfo/rxtx



__
This is the maintainer address of Debian's Java team
<http://lists.alioth.debian.org/mailman/listinfo/pkg-java-maintainers>. Please 
use
debian-j...@lists.debian.org for discussions and questions.

Reply via email to