org.eclipse.ocl
Class ParserException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.eclipse.ocl.ParserException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
SemanticException, SyntaxException

public class ParserException
extends java.lang.Exception

Exception indicating a failure to parse or validate OCL constraints. Since the 1.2 release, the parser exception includes also a Diagnostic carrying details of the one or more parse problems.

Author:
Christian Vogt (cvogt)
See Also:
Serialized Form

Constructor Summary
ParserException(org.eclipse.emf.common.util.Diagnostic problem)
          Initializes me with a diagnostic obtained from a problem handler.
ParserException(java.lang.String msg)
          Initializes me with a user-friendly message describing the nature of the parse failure.
ParserException(java.lang.String msg, java.lang.Throwable cause)
          Initializes me with a message and an exception that caused the parse failure.
 
Method Summary
 org.eclipse.emf.common.util.Diagnostic getDiagnostic()
          Obtains the diagnostic describing one or more parse problems that I signal.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParserException

public ParserException(java.lang.String msg)
Initializes me with a user-friendly message describing the nature of the parse failure.

Parameters:
msg - the exception message

ParserException

public ParserException(java.lang.String msg,
                       java.lang.Throwable cause)
Initializes me with a message and an exception that caused the parse failure.

Parameters:
msg - my user-friendly message
cause - the cause of the parse failure

ParserException

public ParserException(org.eclipse.emf.common.util.Diagnostic problem)
Initializes me with a diagnostic obtained from a problem handler.

Parameters:
problem - the diagnostic
Since:
1.2
Method Detail

getDiagnostic

public org.eclipse.emf.common.util.Diagnostic getDiagnostic()
Obtains the diagnostic describing one or more parse problems that I signal.

Returns:
the diagnostic, which may be a chain of multiple problems or even just an "OK" diagnostic indicating an absence of parse problems
Since:
1.2