Public Types | Public Member Functions | Static Public Member Functions

ELAM::Exception Class Reference

Objects of this class represent an exception in the evaluation of an ELAM expression. More...

#include <elamvalue.h>

Collaboration diagram for ELAM::Exception:
Collaboration graph
[legend]

List of all members.

Public Types

enum  ErrorType {
  NoError = 0, ParserError, UnknownOperatorError, UnknownFunctionError,
  UnknownValueError, TypeMismatchError, ArgumentListError, OperationError
}
 

Type of Exception.

More...

Public Member Functions

 Exception (const Exception &)
 instantiates a copy of an exception
 Exception (const QVariant &)
 instantiate a copy from a matching variant
 Exception (ErrorType type=NoError, QString errorText=QString(), Position pos=Position())
 instantiates an exception
 Exception (ErrorType type, Position pos, QString errorText=QString())
 instantiates an exception
Exceptionoperator= (const Exception &)
 copies an exception
QString errorText () const
 returns the describing text of the exception (if existing)
ErrorType errorType () const
 type of error represented by the exception
QString errorTypeName () const
 returns a human readable error type name of this exception
Position errorPos () const
 the position in the original expression where the error originated
Position position () const
 the position in the original expression where the error originated
int errorLine () const
 the line in the original expression where the error originated
int errorColumn () const
 the column in the original expression where the error originated
void setPosition (Position p)
 overrides the exceptions position
 operator QVariant () const
 converts the exception to a variant

Static Public Member Functions

static int metaTypeId ()
 the meta type ID (used with QVariant) of the exception type

Detailed Description

Objects of this class represent an exception in the evaluation of an ELAM expression.


Member Enumeration Documentation

Type of Exception.

Enumerator:
NoError 

not an exception

ParserError 

error while parsing the expression

UnknownOperatorError 

the operator is not known

UnknownFunctionError 

the function is not known

UnknownValueError 

unknown variable or constant

TypeMismatchError 

the operator or function is known, but the type of one of the arguments is not supported

ArgumentListError 

the amount of arguments to a function is wrong or the syntax of arguments

OperationError 

the operation itself failed, e.g. division by zero


Constructor & Destructor Documentation

ELAM::Exception::Exception ( const Exception  ) 

instantiates a copy of an exception

ELAM::Exception::Exception ( const QVariant &   ) 

instantiate a copy from a matching variant

ELAM::Exception::Exception ( ErrorType  type = NoError,
QString  errorText = QString(),
Position  pos = Position() 
)

instantiates an exception

Parameters:
type the type of exception
errorText some human readable text describing the problem
pos the position in the original expression string where the problem occurred
ELAM::Exception::Exception ( ErrorType  type,
Position  pos,
QString  errorText = QString() 
)

instantiates an exception

Parameters:
type the type of exception
errorText some human readable text describing the problem
pos the position in the original expression string where the problem occurred

Member Function Documentation

int ELAM::Exception::errorColumn (  )  const [inline]

the column in the original expression where the error originated

int ELAM::Exception::errorLine (  )  const [inline]

the line in the original expression where the error originated

Position ELAM::Exception::errorPos (  )  const [inline]

the position in the original expression where the error originated

QString ELAM::Exception::errorText (  )  const [inline]

returns the describing text of the exception (if existing)

ErrorType ELAM::Exception::errorType (  )  const [inline]

type of error represented by the exception

QString ELAM::Exception::errorTypeName (  )  const

returns a human readable error type name of this exception

static int ELAM::Exception::metaTypeId (  )  [static]

the meta type ID (used with QVariant) of the exception type

ELAM::Exception::operator QVariant (  )  const [inline]

converts the exception to a variant

Exception& ELAM::Exception::operator= ( const Exception  ) 

copies an exception

Position ELAM::Exception::position (  )  const [inline]

the position in the original expression where the error originated

void ELAM::Exception::setPosition ( Position  p  )  [inline]

overrides the exceptions position


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Friends