This repository has been archived on 2021-11-25. You can view files and clone it, but cannot push or open issues or pull requests.
DBHomework/jsonfail.cpp

35 lines
876 B
C++
Raw Normal View History

2017-11-20 09:07:58 +08:00
#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";
2017-11-20 09:37:43 +08:00
case err_session:
return "Session Error";
2017-11-20 11:43:49 +08:00
case err_general:
2017-11-20 09:07:58 +08:00
return "General error";
case err_parameter:
return "Parameter error";
2017-11-20 11:43:49 +08:00
default:
return "Unknown error";
2017-11-20 09:07:58 +08:00
}
}