Class TranslatorException
java.lang.Object
java.lang.Throwable
java.lang.Exception
net.ssehub.easy.dslCore.translation.TranslatorException
- All Implemented Interfaces:
Serializable,net.ssehub.easy.basics.messages.IIdentifiable
public class TranslatorException
extends Exception
implements net.ssehub.easy.basics.messages.IIdentifiable
Defines a specific model translator exception which carries information about
the context where the error occurred.
- Author:
- Holger Eichelberger
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.eclipse.emf.ecore.EObjectprivate org.eclipse.emf.ecore.EStructuralFeatureprivate intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionTranslatorException(String message, org.eclipse.emf.ecore.EObject cause, org.eclipse.emf.ecore.EStructuralFeature causingFeature, int code) Creates a translator exception upon a given message string.TranslatorException(net.ssehub.easy.basics.messages.IIdentifiable ex, org.eclipse.emf.ecore.EObject cause, org.eclipse.emf.ecore.EStructuralFeature causingFeature) Creates a translator exception upon an IVML exception. -
Method Summary
Modifier and TypeMethodDescriptionbooleanconsume()Returns whether this exception shall be consumed and not passed to the user.org.eclipse.emf.ecore.EStructuralFeatureReturns the the specific language feature withingetECause()which caused the exception.intgetCode()Returns a numerical code representing the problem.org.eclipse.emf.ecore.EObjectReturns the Ecore language model element for which the exception was caused.intgetId()Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.ssehub.easy.basics.messages.IIdentifiable
getMessage
-
Field Details
-
CONSUME
public static final int CONSUME- See Also:
-
INTERNAL
public static final int INTERNAL- See Also:
-
cause
private org.eclipse.emf.ecore.EObject cause -
causingFeature
private org.eclipse.emf.ecore.EStructuralFeature causingFeature -
code
private int code
-
-
Constructor Details
-
TranslatorException
public TranslatorException(net.ssehub.easy.basics.messages.IIdentifiable ex, org.eclipse.emf.ecore.EObject cause, org.eclipse.emf.ecore.EStructuralFeature causingFeature) Creates a translator exception upon an IVML exception.- Parameters:
ex- the causing exceptioncause- the Ecore language model element for which the exception was causedcausingFeature- the specific language feature withincausewhich caused the exception
-
TranslatorException
public TranslatorException(String message, org.eclipse.emf.ecore.EObject cause, org.eclipse.emf.ecore.EStructuralFeature causingFeature, int code) Creates a translator exception upon a given message string.- Parameters:
message- the message stringcause- the Ecore language model element for which the exception was causedcausingFeature- the specific language feature withincausewhich caused the exceptioncode- a numerical code representing the problem
-
-
Method Details
-
getECause
public org.eclipse.emf.ecore.EObject getECause()Returns the Ecore language model element for which the exception was caused.- Returns:
- the Ecore language model
-
getCausingFeature
public org.eclipse.emf.ecore.EStructuralFeature getCausingFeature()Returns the the specific language feature withingetECause()which caused the exception.- Returns:
- the language feature
-
getCode
public int getCode()Returns a numerical code representing the problem.- Returns:
- a numerical code
-
getId
public int getId()- Specified by:
getIdin interfacenet.ssehub.easy.basics.messages.IIdentifiable
-
consume
public boolean consume()Returns whether this exception shall be consumed and not passed to the user.- Returns:
trueif it shall be consumed,falseelse
-