Package org.jboss.seam.exceptions

Examples of org.jboss.seam.exceptions.ExceptionHandler


   }
  
   @Create
   public void initialize() throws Exception
   {
      ExceptionHandler anyhandler1 = parse("/WEB-INF/exceptions.xml"); //deprecated
      ExceptionHandler anyhandler2 = parse("/WEB-INF/pages.xml");
     
      exceptionHandlers.add( new AnnotationRedirectHandler() );
      exceptionHandlers.add( new AnnotationErrorHandler() );
     
      if ( Init.instance().isDebug() )
View Full Code Here


      if (anyhandler2!=null) exceptionHandlers.add(anyhandler2);
   }

   private ExceptionHandler parse(String fileName) throws DocumentException, ClassNotFoundException
   {
      ExceptionHandler anyhandler = null;
      InputStream stream = Resources.getResourceAsStream(fileName);
      if (stream!=null)
      {
         log.debug("reading exception mappings from " + fileName);
         List<Element> elements = XML.getRootElement(stream).elements("exception");
         for (final Element exception: elements)
         {
            String className = exception.attributeValue("class");
            if (className==null)
            {
               anyhandler = createHandler(exception, Exception.class);
            }
            else
            {
               ExceptionHandler handler = createHandler( exception, Reflections.classForName(className) );
               if (handler!=null) exceptionHandlers.add(handler);
            }
         }
      }
      return anyhandler;
View Full Code Here

TOP

Related Classes of org.jboss.seam.exceptions.ExceptionHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.