22 #ifndef XQEXCEPTION_HPP
23 #define XQEXCEPTION_HPP
25 #include <xqilla/framework/XQillaExport.hpp>
26 #include <xqilla/utils/XStr.hpp>
28 #define XQThrow(type, function, reason) throw type(function, reason, this, __FILE__, __LINE__)
29 #define XQThrow2(type, function, reason) throw type(function, reason, 0, __FILE__, __LINE__)
30 #define XQThrow3(type, function, reason, location) throw type(function, reason, location, __FILE__, __LINE__)
31 #define XQSimpleThrow(reason, xqfile, xqline, xqcolumn) throw XQException(reason, xqfile, xqline, (unsigned int)xqcolumn, __FILE__, __LINE__)
38 XQException(
const XMLCh *reason,
const XMLCh* file,
unsigned int line,
unsigned int column,
const char *cppFile,
unsigned int cppLine);
42 const XMLCh *
getType()
const {
return type_; }
43 const XMLCh *
getError()
const {
return error_; }
49 void setXQueryPosition(
const XMLCh *file,
unsigned int line,
unsigned int column);
56 void printDebug(
const XMLCh*
const context)
const;
59 XQException(
const XMLCh*
const type,
const XMLCh*
const functionName,
const XMLCh*
const reason,
const LocationInfo *info,
const char *cppFile,
unsigned int cppLine);
69 unsigned int cppLine_;
71 unsigned int xqLine_, xqColumn_;
const XMLCh * getXQueryFile() const
Definition: XQException.hpp:45
const XMLCh * getError() const
Definition: XQException.hpp:43
const char * getCppFile() const
Definition: XQException.hpp:53
unsigned int getXQueryColumn() const
Definition: XQException.hpp:47
Definition: XQException.hpp:35
unsigned int getCppLine() const
Definition: XQException.hpp:54
const XMLCh * getType() const
Definition: XQException.hpp:42
const XMLCh * getCppFunction() const
Definition: XQException.hpp:52
A class that gives records a location in the query.
Definition: LocationInfo.hpp:31
unsigned int getXQueryLine() const
Definition: XQException.hpp:46