29 lines
710 B
C++
29 lines
710 B
C++
#include "jsonfail.h"
|
|
|
|
const char* GetErrMsg(int errcode)
|
|
{
|
|
switch(errcode)
|
|
{
|
|
case err_need_login:
|
|
return "Please login first";
|
|
case err_method_not_supported:
|
|
return "Request Method not supported";
|
|
case err_missing_parameter:
|
|
return "Missing Parameter";
|
|
case err_config:
|
|
return "Failed to read configure";
|
|
case err_connect:
|
|
return "Failed to connect DB";
|
|
case err_sql:
|
|
return "Failed to execute SQL";
|
|
case err_sql_logic:
|
|
return "SQL Logical Error";
|
|
case err_permission_denied:
|
|
return "Permission denied";
|
|
case err_data:
|
|
return "Data Error";
|
|
default:
|
|
return "General error";
|
|
}
|
|
}
|