Examples of CommandOperationException


Examples of org.bladerunnerjs.model.exception.command.CommandOperationException

      logger.println("");
      logger.println(asciiArtWriter.toString());
      logger.println("");
    }
    catch(IOException e) {
      throw new CommandOperationException("error reading ascii art resource file", e);
    }
   
    return 0;
  }
View Full Code Here

Examples of org.bladerunnerjs.model.exception.command.CommandOperationException

    }
    catch(InvalidNameException e) {
      throw new CommandArgumentsException(e, this);
    }
    catch(ModelUpdateException e) {
      throw new CommandOperationException("Cannot create bladeset '" + bladeset.dir().getPath() + "'", e);
    }
   
    logger.println(Messages.BLADESET_CREATE_SUCCESS_CONSOLE_MSG, bladesetName);
    logger.println(Messages.BLADESET_PATH_CONSOLE_MSG, bladeset.dir().getPath());
   
View Full Code Here

Examples of org.bladerunnerjs.model.exception.command.CommandOperationException

    return "Pull the trigger and run.";
  }
 
  @Override
  public int doCommand(String... args) throws CommandArgumentsException, CommandOperationException {
    throw new CommandOperationException("Bang!");
  }
View Full Code Here

Examples of org.bladerunnerjs.model.exception.command.CommandOperationException

    try {
      BundlableNode bundlableNode = brjs.locateFirstBundlableAncestorNode(bundlableDir);
      logger.println(DependencyGraphReportBuilder.createReport(bundlableNode, showAllDependencies));
    }
    catch (ModelOperationException e) {
      throw new CommandOperationException(e);
    }
    catch (InvalidBundlableNodeException e) {
      throw new CommandArgumentsException(e, this);
    }
    return 0;
View Full Code Here

Examples of org.bladerunnerjs.model.exception.command.CommandOperationException

      }
      FileUtility.zipFolder(temporaryExportDir, destinationZipLocation, false);
    }
    catch (Exception e)
    {
      throw new CommandOperationException("Could not create application zip for application '" + appName + "'", e)
    }

    logger.println("Successfully exported application '" + appName + "'");
    logger.println(" " + destinationZipLocation.getAbsolutePath());
   
View Full Code Here

Examples of org.bladerunnerjs.model.exception.command.CommandOperationException

    }
    catch(InvalidNameException e) {
      throw new CommandArgumentsException(e, this);
    }
    catch(ModelUpdateException e) {
      throw new CommandOperationException("Cannot create aspect '" + aspect.dir().getPath() + "'", e);
    }
   
    logger.println(Messages.ASPECT_CREATE_SUCCESS_CONSOLE_MSG, aspectName);
    logger.println(Messages.ASPECT_PATH_CONSOLE_MSG, aspect.dir().getPath());
   
View Full Code Here

Examples of org.bladerunnerjs.model.exception.command.CommandOperationException

   
    try {
      logger.println(DependencyGraphReportBuilder.createReport(workbench, showAllDependencies));
    }
    catch (ModelOperationException e) {
      throw new CommandOperationException(e);
    }
    return 0;
  }
View Full Code Here

Examples of org.bladerunnerjs.model.exception.command.CommandOperationException

    File configFile = null;
    try {
      configFile = TestRunnerConfLocator.getTestRunnerConf();
    } catch (FileNotFoundException ex)
    {
      throw new CommandOperationException(ex);
    }
   
    File resultDir = getResultsDir();
    JSAP argsParser = createArgsParser(mode);

    JSAPResult config = argsParser.parse(args);

    boolean success = true;
    if (!config.success())
    {
      throw new CommandArgumentsException("Invalid arguments provided.", testCommand);
    }
    else
    {
      TestRunner testRunner;
     
      try
      {       
        boolean testServerOnly = mode == RunMode.RUN_SERVER;
        boolean generateReports = (mode == RunMode.RUN_TESTS) && config.getBoolean(REPORT_SWITCH);
        boolean noBrowser = (mode == RunMode.RUN_SERVER) && config.getBoolean(NO_BROWSER_SWITCH);
       
        testRunner = new TestRunner(configFile, resultDir, Arrays.asList(config.getStringArray("browsers")), testServerOnly, noBrowser, generateReports);
      }
      catch (Exception ex)
      {
        throw new CommandOperationException("Error parsing test runner configuration file '" + configFile.getAbsolutePath() + "'.", ex);
      }

      if (mode == RunMode.RUN_SERVER)
      {
        try
        {
          testRunner.runServer();
        }
        catch (Exception ex)
        {
          throw new CommandOperationException("Error running server.", ex);
        }
      }
      else
      {
        try
        {
          success = testRunner.runTests(new File(config.getString("dir")), getTestTypeEnum(config.getString("testType")));
        }
        catch (Exception ex)
        {
          testRunner.showExceptionInConsole(ex);
          throw new CommandOperationException("Error running tests.", ex);
        }
      }
    }
    if (!success) {  return 1}
    return 0;
View Full Code Here

Examples of org.bladerunnerjs.model.exception.command.CommandOperationException

        argsParser.registerParameter(new Switch(NO_BROWSER_SWITCH).setLongFlag(NO_BROWSER_SWITCH).setDefault("false").setHelp("you can start the test-server on it's own without a browser"));
      }
    }
    catch (Exception ex)
    {
      throw new CommandOperationException("Error initialising configuration.", ex);
    }
    return argsParser;
  }
View Full Code Here

Examples of org.bladerunnerjs.model.exception.command.CommandOperationException

      {
        testResults.create();
      }
      catch(InvalidNameException | ModelUpdateException e)
      {
        throw new CommandOperationException("Cannot create test results dir at '" + testResults.dir().getPath() + "'");
      }
    }
   
    return testResults.dir();
  }
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.