mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-28 18:26:15 +01:00
715a8b924e
* fix(hogql): Only expose HogQL exceptions relevant to users * Update http.py * Use exposed exceptions more liberally * Update more handling * Update action.py * Rename `Exception` to `Error` * Use new hogql-parser version --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
18 lines
815 B
C++
18 lines
815 B
C++
#include "error.h"
|
|
|
|
using namespace std;
|
|
|
|
#define ERROR_CLASS_IMPLEMENTATION(NAME, BASE) \
|
|
NAME::NAME(const string& message, size_t start, size_t end) : BASE(message), start(start), end(end) {} \
|
|
NAME::NAME(const char* message, size_t start, size_t end) : BASE(message), start(start), end(end) {} \
|
|
NAME::NAME(const string& message) : BASE(message), start(0), end(0) {} \
|
|
NAME::NAME(const char* message) : BASE(message), start(0), end(0) {}
|
|
|
|
ERROR_CLASS_IMPLEMENTATION(HogQLError, runtime_error)
|
|
|
|
ERROR_CLASS_IMPLEMENTATION(SyntaxError, HogQLError)
|
|
ERROR_CLASS_IMPLEMENTATION(NotImplementedError, HogQLError)
|
|
ERROR_CLASS_IMPLEMENTATION(ParsingError, HogQLError)
|
|
|
|
PyInternalError::PyInternalError() : exception() {}
|