VistALink v1.6

gov.va.med.exception
Class FoundationsException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by gov.va.med.exception.FoundationsException
All Implemented Interfaces:
FoundationsExceptionInterface, java.io.Serializable
Direct Known Subclasses:
InstitutionMapNotInitializedException, InstitutionMappingNotFoundException, RpcResponseTypeIsNotXmlException, VistaKernelHashCountLimitExceededException, VistaLinkFaultException, VistaSocketException

public class FoundationsException
extends java.lang.Exception
implements FoundationsExceptionInterface

FoundationsException provides adds nested exception functionality to standard exceptions. This functionality is no longer necessary starting in Java 1.4, whose java.lang.Throwable class introduces built-in support for nested exceptions. However, for backwards compatibility, VistALink exceptions still inherit from this class. Implements methods to return nested exception message as part of current exception message.

The nested exception, uses throwable so it can encapsulate all types of exceptions even Error exceptions.

See Also:
Serialized Form

Constructor Summary
FoundationsException()
          Default constructor.
FoundationsException(java.lang.String msg)
          Constructor.
FoundationsException(java.lang.String msg, java.lang.Throwable nestedException)
          Constructor.
FoundationsException(java.lang.Throwable nestedException)
          Constructor.
 
Method Summary
 java.lang.String getFullStackTrace()
          Deprecated. Use Throwable.getStackTrace() instead.
 java.lang.String getMessage()
          Returns the detail message, including nested messages from the nested exceptions.
 java.lang.Throwable getNestedException()
          Deprecated. Use Throwable.getCause() instead.
 void printStackTrace()
          Prints the composite message and full embedded stack trace to System.err.
 void printStackTrace(java.io.PrintStream ps)
          Prints the composite message and full embedded stack trace to the specified stream ps.
 void printStackTrace(java.io.PrintWriter pw)
          Prints the composite message and full embedded stack trace to the specified print writer pw
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FoundationsException

public FoundationsException()
Default constructor.


FoundationsException

public FoundationsException(java.lang.String msg)
Constructor.

Parameters:
msg -
See Also:
Throwable.Throwable(java.lang.String)

FoundationsException

public FoundationsException(java.lang.Throwable nestedException)
Constructor.

Parameters:
nestedException - exception to nest in new FoundationsException

FoundationsException

public FoundationsException(java.lang.String msg,
                            java.lang.Throwable nestedException)
Constructor.

Parameters:
msg - Exception message
nestedException - exception to nest in new FoundationsException
Method Detail

getNestedException

public java.lang.Throwable getNestedException()
Deprecated. Use Throwable.getCause() instead.

Return nested exception that is wrapped within this exception.

Specified by:
getNestedException in interface FoundationsExceptionInterface
Returns:
nested exception

getMessage

public java.lang.String getMessage()
Returns the detail message, including nested messages from the nested exceptions.

Overrides:
getMessage in class java.lang.Throwable
See Also:
Throwable.getMessage()

printStackTrace

public void printStackTrace(java.io.PrintStream ps)
Prints the composite message and full embedded stack trace to the specified stream ps.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
ps - the print stream
See Also:
Throwable.printStackTrace(java.io.PrintStream)

printStackTrace

public void printStackTrace(java.io.PrintWriter pw)
Prints the composite message and full embedded stack trace to the specified print writer pw

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
pw - the print writer
See Also:
Throwable.printStackTrace(java.io.PrintWriter)

printStackTrace

public void printStackTrace()
Prints the composite message and full embedded stack trace to System.err.

Overrides:
printStackTrace in class java.lang.Throwable
See Also:
Throwable.printStackTrace()

getFullStackTrace

public java.lang.String getFullStackTrace()
Deprecated. Use Throwable.getStackTrace() instead.

Returns the composite message and full embedded stack trace trace

Specified by:
getFullStackTrace in interface FoundationsExceptionInterface
Returns:
full stack trace String
See Also:
FoundationsExceptionInterface.getFullStackTrace()

VistALink v1.6

VistALink v1.6