Class IpsException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.faktorips.devtools.abstraction.exception.IpsException
-
- All Implemented Interfaces:
java.io.Serializable
public class IpsException extends java.lang.RuntimeExceptionTheIpsExceptionis intended to replace Eclipse'sCoreException. Checked Exceptions should be removed from method signatures.During the migration phase, to avoid CoreExceptions in client code, catch all
CoreExceptionsthrown by framework/FIPS-Devtools code, create aIpsExceptionand throw it instead. Use theIpsException(CoreException)constructor.As the
IpsExceptionis an (unchecked)RuntimeExceptionit is not declared by method signatures explicitly, which is exactly what we want to achieve. If one of your methods throws aIpsException, document that it does and in which cases this happens.- Since:
- 22.6, replacing org.faktorips.devtools.model.exception.CoreRuntimeException
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IpsException(java.lang.String message)Constructor that should be used when replacing the creation ofCoreExceptions.IpsException(java.lang.String message, java.lang.Throwable cause)IpsException(java.lang.String message, org.eclipse.core.runtime.CoreException cause)IpsException(java.lang.String message, IpsException cause)IpsException(org.eclipse.core.runtime.CoreException cause)Constructor that should be used when aCoreExceptionneeds to be wrapped into an unchecked exception.IpsException(org.eclipse.core.runtime.IStatus status)Constructor that wraps a status in aIpsExceptionby creating a newCoreExceptioninternally.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.core.runtime.IStatusgetStatus()
-
-
-
Constructor Detail
-
IpsException
public IpsException(org.eclipse.core.runtime.CoreException cause)
Constructor that should be used when aCoreExceptionneeds to be wrapped into an unchecked exception.
-
IpsException
public IpsException(org.eclipse.core.runtime.IStatus status)
Constructor that wraps a status in aIpsExceptionby creating a newCoreExceptioninternally.
-
IpsException
public IpsException(java.lang.String message, org.eclipse.core.runtime.CoreException cause)
-
IpsException
public IpsException(java.lang.String message, java.lang.Throwable cause)
-
IpsException
public IpsException(java.lang.String message)
Constructor that should be used when replacing the creation ofCoreExceptions. Instead of theCoreExceptioncreate anIpsExceptionwith the same error message.For example this constructor could be used when operations on the model cannot continue due to inconsistencies. E.g. when a component or type not found by qualified name and find() returned
null.
-
IpsException
public IpsException(java.lang.String message, IpsException cause)
-
-