Tap 4.1.2 PageNotFoundException not caught
------------------------------------------

                 Key: TAPESTRY-1616
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1616
             Project: Tapestry
          Issue Type: Bug
          Components: Framework
    Affects Versions: 4.1.2
         Environment: Linux, Java 5
            Reporter: Shing Hing Man


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)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to