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
SemanticViolation
public SemanticViolation(Container culprit,
String s)
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.