---------- Forwarded message ----------
From: Steffen DETTMER <steffen.dett...@ingenico.com>
Date: Wed, Jun 23, 2010 at 5:28 AM
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 08:38 +0300:
> > 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);
> >                };

Is this intentionally not throwing the exception? Well, then it
still would be discarded (althrough not neccesarily silently :)).
BTW, I don't think System.err is a good idea.

It is `statically initialized'? I think then this means it is
unclear who the caller is and who could catch this exception.

Wouldn't it be better to store the exception in a member and
throw it when needing Zystem (e.g. in new or open)?

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