You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bill Holloway <bi...@peoplepad.com> on 2008/04/12 05:29:55 UTC
T5: exception type prefix during onException
In using onException, I send the resulting string to a conditionally-shown
<p> on the page. I notice that every time it's displayed (after an
exception), it is prefixed with a string describing the type of my
exception. So if my message is "database is unreachable", the message
displayed on the page is
java.lang.Exception: database is unreachable
Is there any way to knock out the prefixing of the exception type?
--
Bill @ PeoplePad
Re: T5: exception type prefix during onException
Posted by Bill Holloway <bi...@peoplepad.com>.
Sure, that'll work. I guess I was wondering if there were a built-in
feature to disable this or if something in the JVM were involved that
I could configure. I should've worded my question that way!
Thanks!
Bill
On 4/12/08, Filip S. Adamsen <fs...@fsadev.com> wrote:
> How about this:
>
> public static stripExceptionPrefix(String message) {
> return message.substring(message.indexOf(":")).trim();
> }
>
> Stick that somewhere and just use that?
>
> -Filip
>
>
> On 2008-04-12 05:29, Bill Holloway wrote:
>
> > In using onException, I send the resulting string to a conditionally-shown
> > <p> on the page. I notice that every time it's displayed (after an
> > exception), it is prefixed with a string describing the type of my
> > exception. So if my message is "database is unreachable", the message
> > displayed on the page is
> >
> > java.lang.Exception: database is unreachable
> >
> > Is there any way to knock out the prefixing of the exception type?
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Bill @ PeoplePad
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: exception type prefix during onException
Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
How about this:
public static stripExceptionPrefix(String message) {
return message.substring(message.indexOf(":")).trim();
}
Stick that somewhere and just use that?
-Filip
On 2008-04-12 05:29, Bill Holloway wrote:
> In using onException, I send the resulting string to a conditionally-shown
> <p> on the page. I notice that every time it's displayed (after an
> exception), it is prefixed with a string describing the type of my
> exception. So if my message is "database is unreachable", the message
> displayed on the page is
>
> java.lang.Exception: database is unreachable
>
> Is there any way to knock out the prefixing of the exception type?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org