code: public ErrorPage getErrorPage(PageException pe, short type) {
  	for (int i = pages.size() - 1; i >= 0; i--) {
  	    ErrorPageImpl ep = (ErrorPageImpl) pages.get(i);
  	    if (ep.getType() == type) {
  		if (type == ErrorPage.TYPE_EXCEPTION) {
  		    if (pe.typeEqual(ep.getTypeAsString())) return ep;
  		}
  		else return ep;
  
  	    }
  	}
  	return null;
      }
docs: returns the error page
  
  @param pe Page Exception
  @return