ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.xmlconfig
Class DistributionCreationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by umontreal.iro.lecuyer.xmlconfig.DistributionCreationException
All Implemented Interfaces:
Serializable

public class DistributionCreationException
extends RuntimeException

This exception is thrown when a problem occurs during the construction of a distribution object by RandomVariateGenParam.createDistribution() or RandomVariateGenParam.createDistributionInt(), or during the parsing of the nested text containing a distribution XML element.

See Also:
Serialized Form

Constructor Summary
DistributionCreationException()
          Constructs a new distribution creation exception with no distribution information or message.
DistributionCreationException(Class<? extends Distribution> distClass, String distParams)
          Constructs a new distribution creation exception with distribution class distClass, distribution parameters distParams, and no message.
DistributionCreationException(Class<? extends Distribution> distClass, String distParams, String message)
          Constructs a new distribution creation exception with distribution class distClass, distribution parameters distParams, and message message.
DistributionCreationException(String message)
          Constructs a new distribution creation exception with no distribution information and message message.
 
Method Summary
 Class<? extends Distribution> getDistributionClass()
          Returns the distribution class which caused the exception.
 String getDistributionParameters()
          Returns the distribution parameters for which there is no corresponding constructor in the distribution class, or an exception occurred during the call to a constructor.
 String toString()
          Returns a short description of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DistributionCreationException

public DistributionCreationException()
Constructs a new distribution creation exception with no distribution information or message.


DistributionCreationException

public DistributionCreationException(String message)
Constructs a new distribution creation exception with no distribution information and message message.

Parameters:
message - the message describing the exception.

DistributionCreationException

public DistributionCreationException(Class<? extends Distribution> distClass,
                                     String distParams)
Constructs a new distribution creation exception with distribution class distClass, distribution parameters distParams, and no message.

Parameters:
distClass - the class of the distribution which cannot be created.
distParams - the parameters given to the constructor of the distribution class.

DistributionCreationException

public DistributionCreationException(Class<? extends Distribution> distClass,
                                     String distParams,
                                     String message)
Constructs a new distribution creation exception with distribution class distClass, distribution parameters distParams, and message message.

Parameters:
distClass - the class of the distribution which cannot be created.
distParams - the parameters given to the constructor of the distribution class.
message - the message describing the exception.
Method Detail

getDistributionClass

public Class<? extends Distribution> getDistributionClass()
Returns the distribution class which caused the exception.

Returns:
the distribution class having caused the exception.

getDistributionParameters

public String getDistributionParameters()
Returns the distribution parameters for which there is no corresponding constructor in the distribution class, or an exception occurred during the call to a constructor.

Returns:
the distribution parameters having caused the exception.

toString

public String toString()
Returns a short description of this exception. If no distribution class and parameters are associated with this exception, this method returns the result of the superclass's toString method. Otherwise, it returns a string with the following contents.

Overrides:
toString in class Throwable
Returns:
the short string describing the exception.

ContactCenters
V. 0.9.9.

To submit a bug or ask questions, send an e-mail to Richard Simard.