Package org.dmd.util.exceptions

Examples of org.dmd.util.exceptions.ResultException.addError()


      }
     
      if (controller.isCentralRPCErrorHandler()){
        if (centralRpcErrorHandler != null){
          ResultException ex = new ResultException();
          ex.addError("Multiple controllers are specified as the central RPC error handler.");
          ex.result.lastResult().moreMessages(centralRpcErrorHandler.getControllerName() + " in " + centralRpcErrorHandler.getDefinedInModule().getFile() + " at line " + centralRpcErrorHandler.getDefinedInModule().getLineNumber());
          ex.result.lastResult().moreMessages(controller.getControllerName() + " in " + controller.getDefinedInModule().getFile() + " at line " + controller.getDefinedInModule().getLineNumber());
          throw(ex);
        }
        centralRpcErrorHandler = controller;
View Full Code Here


        centralRpcErrorHandler = controller;
      }
      if (controller.isCentralDMPErrorHandler()){
        if (centralDmpErrorHandler != null){
          ResultException ex = new ResultException();
          ex.addError("Multiple controllers are specified as the central DMP error handler.");
          ex.result.lastResult().moreMessages(centralDmpErrorHandler.getControllerName() + " in " + centralDmpErrorHandler.getDefinedInModule().getFile() + " at line " + centralDmpErrorHandler.getDefinedInModule().getLineNumber());
          ex.result.lastResult().moreMessages(controller.getControllerName() + " in " + controller.getDefinedInModule().getFile() + " at line " + controller.getDefinedInModule().getLineNumber());
          throw(ex);
        }
        centralDmpErrorHandler = controller;
View Full Code Here

        centralDmpErrorHandler = controller;
      }
      if (controller.isCentralAsyncErrorHandler()){
        if (centralAsyncErrorHandler != null){
          ResultException ex = new ResultException();
          ex.addError("Multiple controllers are specified as the central asynchronous code loading error handler.");
          ex.result.lastResult().moreMessages(centralAsyncErrorHandler.getControllerName() + " in " + centralAsyncErrorHandler.getDefinedInModule().getFile() + " at line " + centralDmpErrorHandler.getDefinedInModule().getLineNumber());
          ex.result.lastResult().moreMessages(controller.getControllerName() + " in " + controller.getDefinedInModule().getFile() + " at line " + controller.getDefinedInModule().getLineNumber());
          throw(ex);
        }
        centralAsyncErrorHandler = controller;
View Full Code Here

        menuFactoryRCI = rci;
      }
      else{
        MenuImplementationConfig config = (MenuImplementationConfig) def;
        ResultException ex = new ResultException();
        ex.addError("Multiple menu implementations are specified as part of your loaded modules; only one menu implementation can be used.");
        ex.result.lastResult().moreMessages("Menus from " + menuImplementation.getConfigName() + " defined in module " + menuImplementation.getDefinedInModule().getModuleName());
        ex.result.lastResult().moreMessages("Menus from " + config.getConfigName() + " defined in module " + config.getDefinedInModule().getModuleName());
        throw(ex);
      }
    }
View Full Code Here

   
    if (needMvwComms){
      key.setNameString("mvwcomms");
      if (modules.get(key) == null){
        ResultException ex = new ResultException();
        ex.addError("One or more of your components specify that they send Dark Matter Protocol messages, but you haven't loaded the mvwcomms module.");
        throw(ex);
      }
    }
   
    for(MvwDefinition def : allDefs.values()){
View Full Code Here

            String request = rq.getRequestType() + "Request";
            String response = rq.getRequestType() + "Response";
            ClassDefinition cd = readSchemas.cdef(request);
            if (cd == null){
              ResultException ex = new ResultException();
              ex.addError("Unknown request type: " + request);
              ex.result.lastResult().lineNumber(component.getLineNumber());
              ex.result.lastResult().fileName(component.getFile());
              throw(ex);
            }
            rq.setRequestImport(cd.getDmoImport());
View Full Code Here

            rq.setRequestImport(cd.getDmoImport());
           
            cd = readSchemas.cdef(response);
            if (cd == null){
              ResultException ex = new ResultException();
              ex.addError("Unknown response type: " + response);
              ex.result.lastResult().lineNumber(component.getLineNumber());
              ex.result.lastResult().fileName(component.getFile());
              throw(ex);
            }
            rq.setResponseImport(cd.getDmoImport());
View Full Code Here

           
            if (rq.isUsingClassInfo()){
              cd = readSchemas.cdef(rq.getClassName());
              if (cd == null){
                ResultException ex = new ResultException();
                ex.addError("Unknown class: " + rq.getClassName() + " in " + rq.getRequestType() + "Request spec");
                ex.result.lastResult().lineNumber(component.getLineNumber());
                ex.result.lastResult().fileName(component.getFile());
                throw(ex);
              }
              rq.setClassImport(cd.getDmoImport());
View Full Code Here

              rq.setClassImport(cd.getDmoImport());
             
              if (rq.getRequestType().equals("Set") || rq.getRequestType().equals("Delete")){
                if (cd.getIsNamedBy() == null){
                  ResultException ex = new ResultException();
                  ex.addError(rq.getRequestType() + "Requests are only applicable to named objects.");
                  ex.result.lastResult().lineNumber(component.getLineNumber());
                  ex.result.lastResult().fileName(component.getFile());
                  throw(ex);
                }
              }
View Full Code Here

      action.initCodeGenInfo();
    }
   
    if ((application != null) && needAsyncErrorHandler && (centralAsyncErrorHandler == null)){
      ResultException ex = new ResultException();
      ex.addError("One or more elements make use of code splitting, but no Controller is defined as the centralAsyncErrorHandler.");
      throw(ex);
    }
  }
 
  void resetCodeGenInfo(){
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.