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
kiritow bb4c4dfb0e Lunch commit
Add editbook. Add err_parameter to jsonfail. Update design.
2017-11-20 14:17:31 +08:00

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