Damn those commons-pool developers for making me catch their checked
exception.......And not even a specific type at that...Oh no...just
java.lang.Exception. fuc%4%-ers...
I should probably try some strategy to re-throw the original exception if
it's within the org.apache.tapestry package.
If someone logs a jira issue I won't forget about it.
On 6/28/07, Shing Hing Man <[EMAIL PROTECTED]> wrote:
After updating to the latest Tap 4.1.2, a
PageNotFoundException is no longer
caught in the following piece of code in my border
component.
public boolean isShowHelpLink() {
boolean show = true;
IPage currentPage = getPage();
String helpPageName = currentPage.getPageName() +
"Help";
try {
IRequestCycle requestCycle =
getPage().getRequestCycle();
requestCycle.getPage(helpPageName); // Exception
here is not caught
} catch (PageNotFoundException pnfe) {
show = false;
}
return show;
}
Instead, the exception is shown on the exception page
:
org.apache.hivemind.ApplicationRuntimeException
There was an error borrowing the page with key
PageKey[_pageName='HomeHelp' , _locale=en_GB ] from
the page pool.
[ +/- ] Exception: Page 'HomeHelp' not found in
application namespace.
org.apache.tapestry.PageNotFoundException
Page 'HomeHelp' not found in application namespace.
pageName: HomeHelp
Stack Trace:
*
org.apache.tapestry.resolver.PageSpecificationResolverImpl.resolve(
PageSpecificationResolverImpl.java:147)
*
$PageSpecificationResolver_113742bd0e2.resolve($PageSpecificationResolver_113742bd0e2.java)
*
$PageSpecificationResolver_113742bd0e3.resolve($PageSpecificationResolver_113742bd0e3.java)
*
org.apache.tapestry.pageload.PageSource.makeObject(PageSource.java:148)
*
org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(
GenericKeyedObjectPool.java:797)
*
org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:177)
*
$IPageSource_113742bd03e.getPage($IPageSource_113742bd03e.java)
*
org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:239)
*
org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:226)
*
$IRequestCycle_113742bd14e.getPage($IRequestCycle_113742bd14e.java)
*
$IRequestCycle_113742bd068.getPage($IRequestCycle_113742bd068.java)
*
net.sf.financial.components.Border.isShowHelpLink(Border.java:103)
*
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
Is the above the expected behaviour ?
Shing
Home page : http://uk.geocities.com/matmsh/
___________________________________________________________
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up
for
your free account today
http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Jesse Kuhnert
Tapestry/Dojo team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com