Package org.ice.exception

Examples of org.ice.exception.NotFoundException


  public void dispatch(String task) throws Exception {
    Method method = null;
    try {
      method = this.getClass().getMethod(task+"Task", new Class<?>[0]);
    } catch (Exception ex)  {
      throw new NotFoundException("Task ["+request.getTaskName()+"] not found for module ["+request.getModuleName()+"]");
    }
    this.preDispatch (method);

    try {
      method.invoke(this, new Object[0]);
    } catch(InvocationTargetException ex) {
      Throwable target = ex.getTargetException();
      if (target instanceof Exception)
        throw (Exception)target;
      throw new IceException(ex.getTargetException(), 500);
    } catch (Exception ex)  {
      throw new NotFoundException("Task ["+request.getTaskName()+"] not found for module ["+request.getModuleName()+"]");
    }
   
    this.postDispatch (method);
   
    if (isUsingTemplate())  {
View Full Code Here


          exception = dispatchModule(module, httpRequest, httpResponse, httpRequest.getTaskName());
          break;
        }
      }
      if (!found)
        throw new NotFoundException("No routers match for request: "+request.getRequestURL().toString());
    } catch (IceException ex)  {
      httpResponse.setException(ex);
      httpResponse.setStatus(ex.status);
      exception = ex;
    }
View Full Code Here

TOP

Related Classes of org.ice.exception.NotFoundException

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.