issrg.pba
Class PbaException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by issrg.utils.EmbeddedException
              extended by issrg.pba.PbaException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ACNotFoundException, BadURLException, DecisionWithObligationException, EvaluationException, OldCredentialsException, PkiException, PMException, PolicyParsingException, RevocationNotDecisiveException, SamlException, SignatureVerificationFailedException, TargetOutOfDomainException

public class PbaException
extends EmbeddedException

This is an exception to be thrown by PBA API implementations in cases of need. It contains the real cause of the error, in case the error has been caused by some other objects used by the implementation.

Example:

try{
...
}catch(PbaException pba){
throw pba;
}catch(Throwable th){
throw new PbaException("Internal error", th);
}
Note that the code above will throw only PbaExceptions. All other errors are caught and embedded. This allows the caller of the code to catch PbaExceptions only, and be sure nothing else will happen. The simplest error handler will just display an error, a sophisticated error handler can still extract the real cause of the error and do something cleverer.

Version:
1.0
Author:
A Otenko
See Also:
Serialized Form

Constructor Summary
PbaException()
          The default constructor builds an exception with no explanation message and no embedded exception.
PbaException(java.lang.String msg)
          This constructor builds an exception with a message but no embedded exception.
PbaException(java.lang.String msg, java.lang.Throwable th)
          This constructor builds an exception with a message and an embedded exception to be returned by getEmbedded method.
 
Method Summary
 
Methods inherited from class issrg.utils.EmbeddedException
getEmbedded, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PbaException

public PbaException()
The default constructor builds an exception with no explanation message and no embedded exception.


PbaException

public PbaException(java.lang.String msg)
This constructor builds an exception with a message but no embedded exception.

Parameters:
msg - is the String message explaining the error; can be null

PbaException

public PbaException(java.lang.String msg,
                    java.lang.Throwable th)
This constructor builds an exception with a message and an embedded exception to be returned by getEmbedded method.

Parameters:
msg - is the String explanation of the error; can be null
th - is the Throwable object to be believed the cause of the error; can be null, if there is no embedded exception
See Also:
EmbeddedException.getEmbedded()