de.knipp.rritoolkit
Class ResponseParseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by de.knipp.rritoolkit.ResponseParseException
All Implemented Interfaces:
java.io.Serializable

public class ResponseParseException
extends java.lang.Exception

exception that is thrown if the parsing of the key-value pair or XML response fails for some reason

Version:
$Revision: 14936 $
Author:
Klaus Malorny
See Also:
Serialized Form

Field Summary
private  java.lang.String key
          the key, if available
private  org.w3c.dom.Node node
          the node, if available
private  java.lang.String section
          the section, if available
private  java.lang.String value
          the value, if available
 
Constructor Summary
ResponseParseException(java.lang.String message)
          constructor
ResponseParseException(java.lang.String message, org.w3c.dom.Node theNode)
          constructor for an exception related to XML parsing
ResponseParseException(java.lang.String message, org.w3c.dom.Node theNode, java.lang.Throwable cause)
          constructor for an exception related to XML parsing
ResponseParseException(java.lang.String message, java.lang.String theValue)
          constructor for an exception related to key-value pair parsing
ResponseParseException(java.lang.String message, java.lang.String theKey, java.lang.String theValue)
          constructor for an exception related to key-value pair parsing
ResponseParseException(java.lang.String message, java.lang.String theSection, java.lang.String theKey, java.lang.String theValue)
          constructor for an exception related to key-value pair parsing
ResponseParseException(java.lang.String message, java.lang.String theSection, java.lang.String theKey, java.lang.String theValue, java.lang.Throwable cause)
          constructor for an exception related to key-value pair parsing
ResponseParseException(java.lang.String message, java.lang.String theKey, java.lang.String theValue, java.lang.Throwable cause)
          constructor for an exception related to key-value pair parsing
ResponseParseException(java.lang.String message, java.lang.String theValue, java.lang.Throwable cause)
          constructor for an exception related to key-value pair parsing
ResponseParseException(java.lang.String message, java.lang.Throwable cause)
          constructor
 
Method Summary
private static void buildPath(org.w3c.dom.Node node, java.lang.StringBuilder sb)
          try to construct a XPath like path that describes the location of the given node.
 java.lang.String getKey()
          return the key
 java.lang.String getMessage()
          return a description of the exception
 org.w3c.dom.Node getNode()
          return the XML node
 java.lang.String getSection()
          return the section
 java.lang.String getValue()
          return the value
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

section

private java.lang.String section
the section, if available


key

private java.lang.String key
the key, if available


value

private java.lang.String value
the value, if available


node

private org.w3c.dom.Node node
the node, if available

Constructor Detail

ResponseParseException

public ResponseParseException(java.lang.String message)
constructor

Parameters:
message - the message

ResponseParseException

public ResponseParseException(java.lang.String message,
                              java.lang.Throwable cause)
constructor

Parameters:
message - the message
cause - the cause

ResponseParseException

public ResponseParseException(java.lang.String message,
                              java.lang.String theSection,
                              java.lang.String theKey,
                              java.lang.String theValue,
                              java.lang.Throwable cause)
constructor for an exception related to key-value pair parsing

Parameters:
message - the message
theSection - the section, may be null
theKey - the key, may be null
theValue - the value, may be null
cause - the cause, may be null

ResponseParseException

public ResponseParseException(java.lang.String message,
                              java.lang.String theKey,
                              java.lang.String theValue,
                              java.lang.Throwable cause)
constructor for an exception related to key-value pair parsing

Parameters:
message - the message
theKey - the key, may be null
theValue - the value, may be null
cause - the cause, may be null

ResponseParseException

public ResponseParseException(java.lang.String message,
                              java.lang.String theValue,
                              java.lang.Throwable cause)
constructor for an exception related to key-value pair parsing

Parameters:
message - the message
theValue - the value, may be null
cause - the cause, may be null

ResponseParseException

public ResponseParseException(java.lang.String message,
                              java.lang.String theSection,
                              java.lang.String theKey,
                              java.lang.String theValue)
constructor for an exception related to key-value pair parsing

Parameters:
message - the message
theSection - the section, may be null
theKey - the key, may be null
theValue - the value, may be null

ResponseParseException

public ResponseParseException(java.lang.String message,
                              java.lang.String theKey,
                              java.lang.String theValue)
constructor for an exception related to key-value pair parsing

Parameters:
message - the message
theKey - the key, may be null
theValue - the value, may be null

ResponseParseException

public ResponseParseException(java.lang.String message,
                              java.lang.String theValue)
constructor for an exception related to key-value pair parsing

Parameters:
message - the message
theValue - the value, may be null

ResponseParseException

public ResponseParseException(java.lang.String message,
                              org.w3c.dom.Node theNode)
constructor for an exception related to XML parsing

Parameters:
message - the message
theNode - the causing node, may be null

ResponseParseException

public ResponseParseException(java.lang.String message,
                              org.w3c.dom.Node theNode,
                              java.lang.Throwable cause)
constructor for an exception related to XML parsing

Parameters:
message - the message
theNode - the causing node, may be null
cause - the cause
Method Detail

buildPath

private static void buildPath(org.w3c.dom.Node node,
                              java.lang.StringBuilder sb)
                       throws org.w3c.dom.DOMException
try to construct a XPath like path that describes the location of the given node.

Parameters:
node - the node
sb - the string builder to add to
Throws:
org.w3c.dom.DOMException - on exceptions accessing the DOM

getMessage

public java.lang.String getMessage()
return a description of the exception

Overrides:
getMessage in class java.lang.Throwable
Returns:
the description

getSection

public java.lang.String getSection()
return the section

Returns:
the section name or null if not available

getKey

public java.lang.String getKey()
return the key

Returns:
the key name or null if not available

getValue

public java.lang.String getValue()
return the value

Returns:
the value or null if not available

getNode

public org.w3c.dom.Node getNode()
return the XML node

Returns:
the node or null if not available


Copyright © 2005-2011 Knipp Medien und Kommunikation GmbH