Package ptolemy.cg.kernel.generic
Class CGException
- java.lang.Object
-
- ptolemy.cg.kernel.generic.CGException
-
public class CGException extends java.lang.Object
Create exceptions in code generation.This class is introduced so that we don't need to care whether the object is a Nameable of not.
IllegalActionException
normally expects a Nameable as an argument.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Bert Rodiers
- Pt.AcceptedRating:
- Red (rodiers)
- Pt.ProposedRating:
- Red (rodiers)
-
-
Constructor Summary
Constructors Constructor Description CGException()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
throwException(java.lang.Object component, java.lang.String string)
Throw an exception with a detail message that includes the name of the first argument.static void
throwException(java.lang.Object component, java.lang.Throwable cause, java.lang.String detail)
Throw an exception with a detail message that includes the name of the first argument.static void
throwException(java.lang.String string)
Throw an exception with a detail message.
-
-
-
Method Detail
-
throwException
public static void throwException(java.lang.String string) throws IllegalActionException
Throw an exception with a detail message.- Parameters:
string
- The message.- Throws:
IllegalActionException
- Always thrown by this method.
-
throwException
public static void throwException(java.lang.Object component, java.lang.String string) throws IllegalActionException
Throw an exception with a detail message that includes the name of the first argument.- Parameters:
component
- The component.string
- The message.- Throws:
IllegalActionException
- Always thrown by this method.
-
throwException
public static void throwException(java.lang.Object component, java.lang.Throwable cause, java.lang.String detail) throws IllegalActionException
Throw an exception with a detail message that includes the name of the first argument.- Parameters:
component
- The component.cause
- The cause of this exception, or null if the cause is not known or nonexistent.detail
- The message.- Throws:
IllegalActionException
- Always thrown by this method.
-
-