Tapestry
  1. Tapestry
  2. TAPESTRY-1616

Tap 4.1.2 PageNotFoundException not caught

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.1.3
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Linux, Java 5

      Description

      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)

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Shing Hing Man
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development