コード例 #1
0
 public static XMLPlatformException xmlPlatformInvalidXPath(Exception nestedException) {
   Object[] args = {};
   int errorCode = XML_PLATFORM_INVALID_XPATH;
   XMLPlatformException exception =
       new XMLPlatformException(
           ExceptionMessageGenerator.buildMessage(XMLPlatformException.class, errorCode, args));
   exception.setErrorCode(errorCode);
   exception.setInternalException(nestedException);
   return exception;
 }
コード例 #2
0
 public static XMLPlatformException xmlPlatformValidationException(Exception nestedException) {
   Object[] args = {};
   int errorCode = XML_PLATFORM_VALIDATION_EXCEPTION;
   XMLPlatformException exception =
       new XMLPlatformException(
           ExceptionMessageGenerator.buildMessage(XMLPlatformException.class, errorCode, args));
   exception.setErrorCode(errorCode);
   exception.setInternalException(nestedException);
   return exception;
 }
コード例 #3
0
 public static XMLPlatformException xmlPlatformCouldNotInstantiate(
     String xmlPlatformClassName, Exception nestedException) {
   Object[] args = {xmlPlatformClassName};
   int errorCode = XML_PLATFORM_COULD_NOT_INSTANTIATE;
   XMLPlatformException exception =
       new XMLPlatformException(
           ExceptionMessageGenerator.buildMessage(XMLPlatformException.class, errorCode, args));
   exception.setErrorCode(errorCode);
   exception.setInternalException(nestedException);
   return exception;
 }
コード例 #4
0
 public static XMLPlatformException xmlPlatformClassNotFound(
     String xmlPlatformClassName, Exception nestedException) {
   Object[] args = {xmlPlatformClassName};
   int errorCode = XML_PLATFORM_CLASS_NOT_FOUND;
   XMLPlatformException exception =
       new XMLPlatformException(
           ExceptionMessageGenerator.buildMessage(XMLPlatformException.class, errorCode, args));
   exception.setErrorCode(errorCode);
   exception.setInternalException(nestedException);
   return exception;
 }
コード例 #5
0
 public static XMLPlatformException xmlPlatformErrorResolvingXMLSchemas(
     Object[] schemas, Exception nestedException) {
   Object[] args = {};
   int errorCode = XML_PLATFORM_PARSER_ERROR_RESOLVING_XML_SCHEMA;
   XMLPlatformException exception =
       new XMLPlatformException(
           ExceptionMessageGenerator.buildMessage(XMLPlatformException.class, errorCode, args));
   exception.setErrorCode(errorCode);
   exception.setInternalException(nestedException);
   return exception;
 }
コード例 #6
0
 public static XMLPlatformException xmlPlatformFileNotFoundException(
     File file, IOException nestedException) {
   Object[] args = {file.getAbsolutePath()};
   int errorCode = XML_PLATFORM_PARSER_FILE_NOT_FOUND_EXCEPTION;
   XMLPlatformException exception =
       new XMLPlatformException(
           ExceptionMessageGenerator.buildMessage(XMLPlatformException.class, errorCode, args));
   exception.setErrorCode(errorCode);
   exception.setInternalException(nestedException);
   return exception;
 }
コード例 #7
0
 public static XMLPlatformException xmlPlatformSAXParseException(
     SAXParseException nestedException) {
   Object[] args = {
     Integer.valueOf(nestedException.getLineNumber()),
     nestedException.getSystemId(),
     nestedException.getMessage()
   };
   int errorCode = XML_PLATFORM_PARSER_SAX_PARSE_EXCEPTION;
   XMLPlatformException exception =
       new XMLPlatformException(
           ExceptionMessageGenerator.buildMessage(XMLPlatformException.class, errorCode, args));
   exception.setErrorCode(errorCode);
   exception.setInternalException(nestedException);
   return exception;
 }