Class ModelException

    • Constructor Detail

      • ModelException

        public ModelException​(String message,
                              ModelElement element,
                              Throwable cause)
        Creates a model exception.
        Parameters:
        message - the error message
        element - the related model element
        cause - the cause
      • ModelException

        public ModelException​(String message,
                              ModelElement element)
        Creates a model exception.
        Parameters:
        message - the error message
        element - the related model element
      • ModelException

        public ModelException​(String message,
                              Throwable cause)
        Creates a model exception.
        Parameters:
        message - the error message
        cause - the cause
      • ModelException

        public ModelException​(String message)
        Creates a model exception.
        Parameters:
        message - the error message
      • ModelException

        public ModelException​(Collection<ModelError> errors)
        Creates a model exception from a collection of errors.
        Parameters:
        errors - the errors
    • Method Detail

      • getElement

        public ModelElement getElement()
        Gets the related model element.
        Returns:
        the element, may be null!
      • isRelatedTo

        public boolean isRelatedTo​(ModelElement otherElement)
        Returns whether given element is related to this exception.
        Parameters:
        otherElement - some other model element
        Returns:
        true if related