org.rubato.math.module.morphism
Class MappingException

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.morphism.MappingException
All Implemented Interfaces:
java.io.Serializable

public final class MappingException
extends RubatoException

Exception thrown when a module morphism fails to map an element. This exception is thrown, for example, when the element is not in the domain of the morphism. It can, however, also be thrown, when arithmetical error occurs, for example, division by zero.

Author:
Gérard Milmeister
See Also:
Serialized Form

Constructor Summary
MappingException(ModuleElement element, ModuleMorphism morphism)
          Creates a MappingException with a standard message string.
MappingException(java.lang.String msg, ModuleElement element, ModuleMorphism morphism)
          Creates a MappingException with a standard message string.
 
Method Summary
 ModuleElement getElement()
          Returns the element that failed to be mapped.
 ModuleMorphism getModuleMorphism()
          Returns the morphism where the failure occurred.
 
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

MappingException

public MappingException(java.lang.String msg,
                        ModuleElement element,
                        ModuleMorphism morphism)
Creates a MappingException with a standard message string. The standard message indicates the module element, the required domain, and morphism where the failure occurred.

Parameters:
msg - a message to prepend to the standard message
element - the ModuleElement to be mapped
morphism - the ModuleMorphism where the exception occurred

MappingException

public MappingException(ModuleElement element,
                        ModuleMorphism morphism)
Creates a MappingException with a standard message string. The standard message indicates the module element, the required domain, and morphism where the failure occurred.

Parameters:
element - the ModuleElement to be mapped
morphism - the ModuleMorphism where the exception occurred
Method Detail

getElement

public ModuleElement getElement()
Returns the element that failed to be mapped.


getModuleMorphism

public ModuleMorphism getModuleMorphism()
Returns the morphism where the failure occurred.