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
2017-11-20 09:07:58 +08:00

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";
}
}