Class TranslatorException

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.eclipse.emf.ecore.EObject cause  
      private org.eclipse.emf.ecore.EStructuralFeature causingFeature  
      private int code  
      static int CONSUME  
      static int INTERNAL  
    • Constructor Summary

      Constructors 
      Constructor Description
      TranslatorException​(java.lang.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​(IIdentifiable ex, org.eclipse.emf.ecore.EObject cause, org.eclipse.emf.ecore.EStructuralFeature causingFeature)
      Creates a translator exception upon an IVML exception.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean consume()
      Returns whether this exception shall be consumed and not passed to the user.
      org.eclipse.emf.ecore.EStructuralFeature getCausingFeature()
      Returns the the specific language feature within getECause() which caused the exception.
      int getCode()
      Returns a numerical code representing the problem.
      org.eclipse.emf.ecore.EObject getECause()
      Returns the Ecore language model element for which the exception was caused.
      int getId()
      Returns a numerical identifier representing the actual message.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • cause

        private org.eclipse.emf.ecore.EObject cause
      • causingFeature

        private org.eclipse.emf.ecore.EStructuralFeature causingFeature
      • code

        private int code
    • Constructor Detail

      • TranslatorException

        public TranslatorException​(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 exception
        cause - the Ecore language model element for which the exception was caused
        causingFeature - the specific language feature within cause which caused the exception
      • TranslatorException

        public TranslatorException​(java.lang.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 string
        cause - the Ecore language model element for which the exception was caused
        causingFeature - the specific language feature within cause which caused the exception
        code - a numerical code representing the problem
    • Method Detail

      • 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 within getECause() 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()
        Description copied from interface: IIdentifiable
        Returns a numerical identifier representing the actual message. This identifier is used for asserting exceptions in tests.
        Specified by:
        getId in interface IIdentifiable
        Returns:
        the identifier
      • consume

        public boolean consume()
        Returns whether this exception shall be consumed and not passed to the user.
        Returns:
        true if it shall be consumed, false else