20 #ifndef XQEXCEPTION_HPP
21 #define XQEXCEPTION_HPP
23 #include <xqilla/framework/XQillaExport.hpp>
24 #include <xqilla/utils/XStr.hpp>
26 #define XQThrow(type, function, reason) throw type(function, reason, this, __FILE__, __LINE__)
27 #define XQThrow2(type, function, reason) throw type(function, reason, 0, __FILE__, __LINE__)
28 #define XQThrow3(type, function, reason, location) throw type(function, reason, location, __FILE__, __LINE__)
29 #define XQSimpleThrow(reason, xqfile, xqline, xqcolumn) throw XQException(reason, xqfile, xqline, (unsigned int)xqcolumn, __FILE__, __LINE__)
36 XQException(
const XMLCh *reason,
const XMLCh* file,
unsigned int line,
unsigned int column,
const char *cppFile,
unsigned int cppLine);
40 const XMLCh *
getType()
const {
return type_; }
41 const XMLCh *
getError()
const {
return error_; }
47 void setXQueryPosition(
const XMLCh *file,
unsigned int line,
unsigned int column);
54 void printDebug(
const XMLCh*
const context)
const;
57 XQException(
const XMLCh*
const type,
const XMLCh*
const functionName,
const XMLCh*
const reason,
const LocationInfo *info,
const char *cppFile,
unsigned int cppLine);
67 unsigned int cppLine_;
69 unsigned int xqLine_, xqColumn_;
const XMLCh * getXQueryFile() const
Definition: XQException.hpp:43
const XMLCh * getError() const
Definition: XQException.hpp:41
const char * getCppFile() const
Definition: XQException.hpp:51
unsigned int getXQueryColumn() const
Definition: XQException.hpp:45
Definition: XQException.hpp:33
unsigned int getCppLine() const
Definition: XQException.hpp:52
const XMLCh * getType() const
Definition: XQException.hpp:40
const XMLCh * getCppFunction() const
Definition: XQException.hpp:50
A class that gives records a location in the query.
Definition: LocationInfo.hpp:29
unsigned int getXQueryLine() const
Definition: XQException.hpp:44