peersim.config
Class IllegalParameterException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by peersim.config.IllegalParameterException
All Implemented Interfaces:
java.io.Serializable

public class IllegalParameterException
extends java.lang.RuntimeException

Exception thrown to indicate that a configuration property has an invalid value. It is thrown by several methods in Configuration and can be thrown by any component that reads the configuration.

See Also:
Serialized Form

Constructor Summary
IllegalParameterException(java.lang.String name, java.lang.String message)
          Calls super constructor.
 
Method Summary
 java.lang.String getMessage()
          Extends message with info from stack trace.
 java.lang.String getShortMessage()
          Returns the exception message without stack trace information
 
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IllegalParameterException

public IllegalParameterException(java.lang.String name,
                                 java.lang.String message)
Calls super constructor. It passes a string message which is the given message, prefixed with the given property name.

Parameters:
name - Name of configuration property that is invalid
message - Additional info about why the value is invalid
Method Detail

getMessage

public java.lang.String getMessage()
Extends message with info from stack trace. It tries to guess what class called Configuration and adds relevant info from the stack trace about it to the message.

Overrides:
getMessage in class java.lang.Throwable

getShortMessage

public java.lang.String getShortMessage()
Returns the exception message without stack trace information