Examples of ExitStatusException


Examples of org.apache.tools.ant.ExitStatusException

              + " warning(s).";
          getProject().log(RetroWeaverTask.this, msg,
              Project.MSG_WARN);

          if (itsFailOnError)
            throw new ExitStatusException(Integer
                .toString(warningCount)
                + " warning(s)", 1);
        }
      });
      weaver.setVerifier(rv);
View Full Code Here

Examples of org.apache.tools.ant.ExitStatusException

        getProject().log(RetroWeaverTask.this, msg, Project.MSG_INFO);
      }

      public void weavingError(String msg) {
        getProject().log(RetroWeaverTask.this, msg, Project.MSG_ERR);
        throw new ExitStatusException("weaving error", 1);
      }

      public void weavingPath(String pPath) {
        if (itsVerbose)
          getProject().log(RetroWeaverTask.this, "Weaving " + pPath,
              Project.MSG_INFO);
      }
    });

    if (verifyClasspath != null && doVerify()) {

      List<String> refPath = new ArrayList<String>();

      for (String pathItem : verifyClasspath.list()) {
        refPath.add(pathItem);
      }
      if (itsDestDir != null) {
        refPath.add(itsDestDir.getPath());
      }

      RefVerifier rv = new RefVerifier(itsVersion, new EmptyVisitor(), refPath, new VerifierListener() {
        public void verifyPathStarted(String msg) {
          getProject().log(RetroWeaverTask.this, msg,
              Project.MSG_INFO);
        }

        public void verifyClassStarted(String msg) {
          if (itsVerbose)
            getProject().log(RetroWeaverTask.this, msg,
                Project.MSG_INFO);
        }

        public void acceptWarning(String msg) {
          getProject().log(RetroWeaverTask.this, msg,
              Project.MSG_WARN);
        }

        public void displaySummary(int warningCount) {
          String msg = "Verification complete, " + warningCount
              + " warning(s).";
          getProject().log(RetroWeaverTask.this, msg,
              Project.MSG_WARN);

          if (itsFailOnError)
            throw new ExitStatusException(Integer
                .toString(warningCount)
                + " warning(s)", 1);
        }
      });
      weaver.setVerifier(rv);
View Full Code Here

Examples of org.apache.tools.ant.ExitStatusException

        try {
            checkConfiguration();
            err = executeJava();
            if (err != 0) {
                if (failOnError) {
                    throw new ExitStatusException("Java returned: " + err,
                            err,
                            getLocation());
                } else {
                    log("Java Result: " + err, Project.MSG_ERR);
                }
View Full Code Here

Examples of org.apache.tools.ant.ExitStatusException

        try {
            checkConfiguration();
            err = executeJava();
            if (err != 0) {
                if (failOnError) {
                    throw new ExitStatusException("Java returned: " + err,
                            err,
                            getLocation());
                } else {
                    log("Java Result: " + err, Project.MSG_ERR);
                }
View Full Code Here

Examples of org.apache.tools.ant.ExitStatusException

                    }
                }
            }
            log("failing due to " + text, Project.MSG_DEBUG);
            throw ((status == null) ? new BuildException(text)
             : new ExitStatusException(text, status.intValue()));
        }
    }
View Full Code Here

Examples of org.apache.tools.ant.ExitStatusException

                    && firstLocation == Location.UNKNOWN_LOCATION) {
                    firstLocation = ((BuildException) t).getLocation();
                }
                if (t instanceof ExitStatusException
                    && firstExitStatus == null) {
                    ExitStatusException ex = (ExitStatusException) t;
                    firstExitStatus = ex.getStatus();
                    // potentially overwriting existing value but the
                    // location should match the exit status
                    firstLocation = ex.getLocation();
                }
                exceptionMessage.append(StringUtils.LINE_SEP);
                exceptionMessage.append(t.getMessage());
            }
        }
View Full Code Here

Examples of org.apache.tools.ant.ExitStatusException

        } else if (numExceptions > 1) {
            if (firstExitStatus == null) {
                throw new BuildException(exceptionMessage.toString(),
                                         firstLocation);
            } else {
                throw new ExitStatusException(exceptionMessage.toString(),
                                              firstExitStatus, firstLocation);
            }
        }
    }
View Full Code Here

Examples of org.apache.tools.ant.ExitStatusException

        try {
            checkConfiguration();
            err = executeJava();
            if (err != 0) {
                if (failOnError) {
                    throw new ExitStatusException("Java returned: " + err,
                            err,
                            getLocation());
                } else {
                    log("Java Result: " + err, Project.MSG_ERR);
                }
View Full Code Here

Examples of org.apache.tools.ant.ExitStatusException

        try {
            checkConfiguration();
            err = executeJava();
            if (err != 0) {
                if (failOnError) {
                    throw new ExitStatusException("Java returned: " + err,
                            err,
                            getLocation());
                } else {
                    log("Java Result: " + err, Project.MSG_ERR);
                }
View Full Code Here

Examples of org.apache.tools.ant.ExitStatusException

                        text = "No message";
                    }
                }
            }
            throw ((status == null) ? new BuildException(text)
             : new ExitStatusException(text, status.intValue()));
        }
    }
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.