Indeed it sounds like a hack. But a good enough one for my situation. I haven't coded it yet, but I will off course catch the situation that occurs when the page name cannot be extracted from the stack. I will go to the home page, then.
Nonetheless I will vote for your bugreport. Wait. Done. Did you see it Howard? ;-) Regards, Martijn ---- Original Message ---- From: [EMAIL PROTECTED] To: [email protected] Subject: Re: How to get the name of the page that raised an exception? Date: Wed, 16 Nov 2005 00:36:01 -0600 >This sounds like a hack... what happens if the page class has a >different name than the template? For example if I had a common page >class for several different pages, etc. > >And besides, this isn't really bullet-proof. There's no guarantee >that >another class or proxy will be between the page and the exception, or > >even that the page is processed at all. > >I did put an issue on this, I had the same problem. Check it out, and > >please vote for it. It's fairly easy if we can extend Tapestry's >PageNotFoundException: > >Check: >http://issues.apache.org/jira/browse/TAPESTRY-670 > > >-- >Ing. Leonardo Quijano Vincenzi >Director Técnico >DTQ Software > > >Martijn Hinten wrote: >> Thanks Mike! I think I will be able to extract the pagename from my > >> own stack trace, and thus solve my problem. >> >> Thanks again. >> >> >> [EMAIL PROTECTED] wrote: >> >>> This is something I do to emulate Log4j. Examine the stack & find > >>> the first entry that does not contain ExceptionInfo as a >classname. >>> >>> call displayInfo() in your catch statement, or call displayInfo() >>> whereever to track class, method, & line number. >>> >>> note: this code is customized for this example, not taken verbatim > >>> from my code.... >>> >>> - Mike Barber > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >g --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
