Examples of FailureException


Examples of org.rhq.common.jbossas.client.controller.FailureException

        if (noTxDsRequest != null || xaDsRequest != null) {
            ModelNode batch = DatasourceJBossASClient.createBatchRequest(noTxDsRequest, xaDsRequest);
            ModelNode results = client.execute(batch);
            if (!DatasourceJBossASClient.isSuccess(results)) {
                throw new FailureException(results, "Failed to create Oracle datasources");
            }
        }
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.operation.testing.DomainRandomTester.FailureException

          if (!expectFailure) {
            for (String line : lines) {
              System.err.println(line);
            }
          }
          throw new FailureException();
        }

        @Override
        public void fatal(Throwable exception, String... lines) {
          exception.printStackTrace();
View Full Code Here

Examples of org.waveprotocol.wave.model.operation.testing.DomainRandomTester.FailureException

          if (!expectFailure) {
            for (String line : lines) {
              System.err.println(line);
            }
          }
          throw new FailureException();
        }

        @Override
        public void fatal(Throwable exception, String... lines) {
          for (String line : lines) {
View Full Code Here

Examples of org.waveprotocol.wave.model.operation.testing.DomainRandomTester.FailureException

          if (!expectFailure) {
            for (String line : lines) {
              System.err.println(line);
            }
          }
          throw new FailureException();
        }

        @Override
        public void fatal(Throwable exception, String... lines) {
          for (String line : lines) {
View Full Code Here

Examples of sortpom.exception.FailureException

     * @param lineSeparatorString The line separator characters
     */
    LineSeparatorUtil(final String lineSeparatorString) {
        string = lineSeparatorString.replaceAll("\\\\r", "\r").replaceAll("\\\\n", "\n");
        if (isIllegalString()) {
            throw new FailureException(
                    "LineSeparator must be either \\n, \\r or \\r\\n, but separator characters were "
                            + Arrays.toString(lineSeparatorString.getBytes()));
        }
    }
View Full Code Here

Examples of sortpom.exception.FailureException

        }
        if (nrOfIndentSpace == INDENT_TAB) {
            return "\t";
        }
        if (nrOfIndentSpace < INDENT_TAB || nrOfIndentSpace > MAX_INDENT_SPACES) {
            throw new FailureException("nrOfIndentSpace cannot be below -1 or above 255, was: " + nrOfIndentSpace);
        }
        char[] chars = new char[nrOfIndentSpace];
        Arrays.fill(chars, ' ');
        return new String(chars);
    }
View Full Code Here

Examples of sortpom.exception.FailureException

            if (xmlProcessingInstructionParser.existsIgnoredSections()) {
                sortedXml = xmlProcessingInstructionParser.revertIgnoredSections(sortedXml);
            }
            return sortedXml;
        } catch (IOException e) {
            throw new FailureException(errorMsg + xml, e);
        } finally {
            IOUtils.closeQuietly(sortedXmlOutputStream);
        }

    }
View Full Code Here

Examples of sortpom.exception.FailureException

     * Creates the backup file for pom.
     */
    private void createBackupFile() {
        if (createBackupFile) {
            if (backupFileExtension.trim().length() == 0) {
                throw new FailureException("Could not create backup file, extension name was empty");
            }
            fileUtil.backupFile();
            log.info(String.format("Saved backup of %s to %s%s", pomFile.getAbsolutePath(),
                    pomFile.getAbsolutePath(), backupFileExtension));
        }
View Full Code Here

Examples of sortpom.exception.FailureException

                    sortPom();
                    break;
                case STOP:
                    log.error(xmlOrderedResult.getErrorMessage());
                    log.error(String.format(TEXT_FILE_NOT_SORTED, pomFileName));
                    throw new FailureException(String.format(TEXT_FILE_NOT_SORTED, pomFileName));
                default:
                    log.error(xmlOrderedResult.getErrorMessage());
                    throw new IllegalStateException(verifyFailType.toString());
            }
        }
View Full Code Here

Examples of sortpom.exception.FailureException

        ByteArrayInputStream originalXmlInputStream = null;
        try {
            originalXmlInputStream = new ByteArrayInputStream(xml.getBytes(encoding));
            xmlProcessor.setOriginalXml(originalXmlInputStream);
        } catch (JDOMException e) {
            throw new FailureException(errorMsg + xml, e);
        } catch (IOException e) {
            throw new FailureException(errorMsg + xml, e);
        } finally {
            IOUtils.closeQuietly(originalXmlInputStream);
        }
    }
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.