Eidola home

org.eidola.kernel.error
Class SemanticViolation

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.eidola.kernel.error.SemanticViolation
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CyclicMembership, CyclicOwner, IllegalElementType, LazySemanticViolation

public class SemanticViolation
extends Exception

A violation of the semantic restrictions on an element. This doesn't always get thrown as an exception -- violations of lazy rules live in an element's error list (see Container.Compilation.getErrors()).

Version:
[Development version]
Author:
Paul Cantrell
See Also:
Serialized Form

Constructor Summary
SemanticViolation(Container culprit, String s)
           
 
Method Summary
 Container getCulprit()
          Returns the culprit element.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SemanticViolation

public SemanticViolation(Container culprit,
                         String s)
Method Detail

getCulprit

public Container getCulprit()
Returns the culprit element. This is not necessarily the element in whose error list this exception lives; it is the element most directly responsible for the error in some potentially larger context. For example, if a variable tries to be a public and a private member of a class, the variable is the culprit, but the exception will appear in the class's error list.

Eidola home