RE: ErrorHandler

"Thorsten Hilker" <[email protected]>
Newsgroups gmane.comp.java.enhydra.general
Message-ID <002901c3448f$6079c130$6500a8c0@kronos>
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: [email protected] 
> [mailto:[email protected]] On Behalf Of Marco Leal
> Sent: Monday, July 07, 2003 3:16 PM
> To: [email protected]
> 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
> > [email protected] 
> > 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
[email protected] http://www.enhydra.org/mailman/listinfo.cgi/enhydra
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.