#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";
case err_session:
return "Session Error";
case err_general:
return "General error";
case err_parameter:
return "Parameter error";
default:
return "Unknown error";
}