logo       

RE: ErrorHandler: msg#00010

java.enhydra.general

Subject: RE: ErrorHandler

That's absolutely what I was looking for.
THANX.

(Maybe I should have a closer look to the API
next time first. :)

bye
Thorsten

> -----Original Message-----
> From: enhydra-admin@xxxxxxxxxxx
> [mailto:enhydra-admin@xxxxxxxxxxx] On Behalf Of Marco Leal
> Sent: Monday, July 07, 2003 3:16 PM
> To: enhydra@xxxxxxxxxxx
> Subject: Re: Enhydra: ErrorHandler
>
>
> Hi.
>
> Here's how I do it:
>
> public void run(HttpPresentationComms comms) throws
> HttpPresentationException {
> StringWriter stringWriter = null;
> if (comms.exception != null) {
> stringWriter = new StringWriter();
> comms.exception.printStackTrace(new
> PrintWriter(stringWriter));
> LogChannel logChannel = Enhydra.getLogChannel();
> int level = logChannel.getLevel("ERROR");
> logChannel.write(level, "ErrorHandler caught an
> exception -
> " + comms.exception.getMessage());
> logChannel.write(level, "ErrorHandler stack trace = ");
> logChannel.write(level, stringWriter.toString());
> }
> }
>
> Marco.
>
> Thorsten Hilker wrote:
>
> > Hi!
> >
> > If a PO throws an exception the ErrorHandler.po of
> > the PO's package is called.
> >
> > Here my question:
> >
> > Is it possible to access the exception from the
> > ErrorHandler?
> > (This would be very useful to generate an expressive
> > error-page)
> >
> > TIA
> >
> > Thorsten
> >
> > _______________________________________________
> > Enhydra mailing list
> > Enhydra@xxxxxxxxxxx
> > http://www.enhydra.org/mailman/listinfo.cgi/enhydra
> >
> >
>
> --
> Marco Leal
> MobiComp - Mobile Computing & Wireless Solutions
http://www.mobicomp.com/

"Enjoy your job, make lots of money, work within the law. Choose any
two."

_______________________________________________
Enhydra mailing list
Enhydra@xxxxxxxxxxx http://www.enhydra.org/mailman/listinfo.cgi/enhydra


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise