ptolemy.actor
Class TypeConflictException
java.lang.Object
java.lang.Throwable
java.lang.Exception
ptolemy.kernel.util.KernelException
ptolemy.actor.TypeConflictException
- All Implemented Interfaces:
- java.io.Serializable
public class TypeConflictException
- extends KernelException
Thrown on detecting type conflicts.
This class contains all the instances of Inequality where type conflicts
occurred. These inequalities are either not satisfied after type resolution,
or contain terms with unacceptable value, such as BaseType.UNKNOWN.
- Since:
- Ptolemy II 0.2
- Version:
- $Id: TypeConflictException.java 57040 2010-01-27 20:52:32Z cxh $
- Author:
- Yuhong Xiong
- See Also:
- Serialized Form
- Accepted Rating:
- Proposed Rating:
Constructor Summary |
TypeConflictException(java.util.List inequalities)
Construct an Exception with a list of Inequality instances where
type conflicts occurred. |
TypeConflictException(java.util.List inequalities,
java.lang.String detail)
Construct an Exception with a list of Inequality instances where
type conflicts occurred. |
Method Summary |
private java.lang.String |
_listInequalities()
Create a string listing all the inequalities in _inequalities. |
java.util.List |
inequalityList()
Return a list of Inequality instances where type conflicts occurred. |
Methods inherited from class ptolemy.kernel.util.KernelException |
_setCause, _setMessage, generateMessage, generateMessage, generateMessage, getCause, getFullName, getMessage, getName, getNameable1, getNameable2, printStackTrace, printStackTrace, printStackTrace, stackTraceToString |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_inequalities
private java.util.List _inequalities
TypeConflictException
public TypeConflictException(java.util.List inequalities)
- Construct an Exception with a list of Inequality instances where
type conflicts occurred.
The detailed message of this Exception will be the string
"Type conflicts occurred at the following inequalities:",
followed by the list of inequalities. The string describing the
inequalities are generated by the toString() method of the class
Inequality.
- Parameters:
inequalities
- a list of Inequality instances.- See Also:
Inequality.toString()
TypeConflictException
public TypeConflictException(java.util.List inequalities,
java.lang.String detail)
- Construct an Exception with a list of Inequality instances where
type conflicts occurred.
The detailed message of this Exception will be the specified message,
followed by a list of inequalities. The string describing the
inequalities are generated by the toString() method of the class
Inequality.
- Parameters:
inequalities
- a list of Inequality instances.detail
- a message.- See Also:
Inequality.toString()
inequalityList
public java.util.List inequalityList()
- Return a list of Inequality instances where type conflicts occurred.
- Returns:
- A List of Inequality instances where type conflicts occurred.
_listInequalities
private java.lang.String _listInequalities()
- Create a string listing all the inequalities in _inequalities.
The inequalities are sorted according to their natural order
so as to preserve uniformity in error messages.
Each inequality takes one line, and each line starts
with 2 white spaces to make the String more readable.