org.inria.ns.reflex.xml
Class UnmarshalException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.inria.ns.reflex.structures.LocalizableException
              extended by org.inria.ns.reflex.xml.XMLException
                  extended by org.inria.ns.reflex.xml.UnmarshalException
All Implemented Interfaces:
Serializable, Localizable

public class UnmarshalException
extends XMLException

Exception for unmarshaller. This exception occurs when an XML item can't be unmarshalled to its corresponding class.

Usual cause

Author:
Philippe Poulard
See Also:
Serialized Form

Constructor Summary
UnmarshalException(Localizable localizable, Node node, String msg)
          Constructs an instance of UnmarshalException with the specified localizable and detail message.
UnmarshalException(Localizable localizable, Node node, Throwable cause)
          Constructs an instance of UnmarshalException with the specified localizable and cause.
UnmarshalException(Node node)
          Constructs a new UnmarshalException without detail message and cause.
UnmarshalException(Node node, String message)
          Constructs a new UnmarshalException with the specified detail message.
UnmarshalException(Node node, String message, Throwable cause)
          Constructs a new UnmarshalException with the specified detail message and cause.
UnmarshalException(Node node, Throwable cause)
          Constructs a new UnmarshalException with the specified detail message and cause.
 
Method Summary
 String getLocalizedMessage()
          Return a formatted message.
 
Methods inherited from class org.inria.ns.reflex.structures.LocalizableException
getLocation, isLocalizable, setLocation, wasTraced
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnmarshalException

public UnmarshalException(Node node)
Constructs a new UnmarshalException without detail message and cause.

Parameters:
node - The node that cause the error.

UnmarshalException

public UnmarshalException(Node node,
                          String message)
Constructs a new UnmarshalException with the specified detail message. The cause is not initialized.

Parameters:
node - The node that cause the error.
message - The detail message.

UnmarshalException

public UnmarshalException(Node node,
                          String message,
                          Throwable cause)
Constructs a new UnmarshalException with the specified detail message and cause.

Parameters:
node - The node that cause the error.
message - The detail message.
cause - The cause. A null value is permitted, and indicates that the cause is nonexistent or unknown.

UnmarshalException

public UnmarshalException(Node node,
                          Throwable cause)
Constructs a new UnmarshalException with the specified detail message and cause.

Parameters:
node - The node that cause the error.
cause - The cause. A null value is permitted, and indicates that the cause is nonexistent or unknown.

UnmarshalException

public UnmarshalException(Localizable localizable,
                          Node node,
                          Throwable cause)
Constructs an instance of UnmarshalException with the specified localizable and cause.

Parameters:
localizable - The localizable that contains the source file in fault.
node - The node that cause the error.
cause - The Throwable exception that interfered with the normal initialization operation, making the exception necessary.

UnmarshalException

public UnmarshalException(Localizable localizable,
                          Node node,
                          String msg)
Constructs an instance of UnmarshalException with the specified localizable and detail message.

Parameters:
localizable - The localizable that contains the source file in fault.
node - The node that cause the error.
msg - The detail message.
Method Detail

getLocalizedMessage

public String getLocalizedMessage()
Return a formatted message.

Overrides:
getLocalizedMessage in class LocalizableException
Returns:
The canonical path of the node that cause this exception, if known.
See Also:
Throwable.getLocalizedMessage()