|
@@ -7,6 +7,25 @@
|
|
|
|
|
|
class lhhttpapi;
|
|
class lhhttpapi;
|
|
|
|
|
|
|
|
+#define nJsonCatch catch(const nJson::parse_error& e) \
|
|
|
|
+ { \
|
|
|
|
+ mCritical << "WebAPI parse failed: " << e.what();\
|
|
|
|
+ return false;\
|
|
|
|
+ }\
|
|
|
|
+ catch(const nJson::type_error& e) \
|
|
|
|
+ {\
|
|
|
|
+ mCritical << "WebAPI type failed: " << e.what();\
|
|
|
|
+ return false;\
|
|
|
|
+ }catch (const std::exception& e)\
|
|
|
|
+ {\
|
|
|
|
+ mCritical << "WebAPI std failed: " << e.what();\
|
|
|
|
+ return false;\
|
|
|
|
+ }catch(...)\
|
|
|
|
+ {\
|
|
|
|
+ mCritical << "WebAPI Operated failed: unknown error";\
|
|
|
|
+ return false;\
|
|
|
|
+ }
|
|
|
|
+
|
|
class WebAPIBase
|
|
class WebAPIBase
|
|
{
|
|
{
|
|
public:
|
|
public:
|