org.rubato.math.module
Class DomainException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.rubato.base.RubatoException
              extended by org.rubato.math.module.DomainException
All Implemented Interfaces:
java.io.Serializable

public final class DomainException
extends RubatoException

This exception is thrown whenever a module element operation fails due to a wrong domain. The exception contains two pieces of information. The expected module indicates the domain that the element was to be part of. The received module is the domain that the actual element is part of.

See Also:
Serialized Form

Constructor Summary
DomainException(Module expected, Module received)
          Creates a DomainException.
DomainException(java.lang.String message, Module expected, Module received)
          Creates a DomainException.
 
Method Summary
 Module getExpectedDomain()
          Returns the module that was required.
 Module getReceivedDomain()
          Returns the actual module.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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

DomainException

public DomainException(java.lang.String message,
                       Module expected,
                       Module received)
Creates a DomainException.

Parameters:
message - indicates the reason for the exception
expected - the module (or element of that module) that was required
received - the actual module (or element of that module)

DomainException

public DomainException(Module expected,
                       Module received)
Creates a DomainException. A message is generated from expected and received.

Parameters:
expected - the module (or element of that module) that was required
received - the actual module (or element of that module)
Method Detail

getExpectedDomain

public Module getExpectedDomain()
Returns the module that was required.


getReceivedDomain

public Module getReceivedDomain()
Returns the actual module.