comparison Core/Enumerations.cpp @ 2486:ad8f30fc28d1

new error code: DatabaseUnavailable
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 07 Mar 2018 15:46:47 +0100
parents 878b59270859
children 83b8b6743531
comparison
equal deleted inserted replaced
2485:a5196a7d98c6 2486:ad8f30fc28d1
159 return "Cannot send a response which is acceptable according to the Accept HTTP header"; 159 return "Cannot send a response which is acceptable according to the Accept HTTP header";
160 160
161 case ErrorCode_NullPointer: 161 case ErrorCode_NullPointer:
162 return "Cannot handle a NULL pointer"; 162 return "Cannot handle a NULL pointer";
163 163
164 case ErrorCode_DatabaseUnavailable:
165 return "The database is currently not available (probably a transient situation)";
166
164 case ErrorCode_SQLiteNotOpened: 167 case ErrorCode_SQLiteNotOpened:
165 return "SQLite: The database is not opened"; 168 return "SQLite: The database is not opened";
166 169
167 case ErrorCode_SQLiteAlreadyOpened: 170 case ErrorCode_SQLiteAlreadyOpened:
168 return "SQLite: Connection is already open"; 171 return "SQLite: Connection is already open";
1614 case ErrorCode_Unauthorized: 1617 case ErrorCode_Unauthorized:
1615 return HttpStatus_401_Unauthorized; 1618 return HttpStatus_401_Unauthorized;
1616 1619
1617 case ErrorCode_NotAcceptable: 1620 case ErrorCode_NotAcceptable:
1618 return HttpStatus_406_NotAcceptable; 1621 return HttpStatus_406_NotAcceptable;
1622
1623 case ErrorCode_DatabaseUnavailable:
1624 return HttpStatus_503_ServiceUnavailable;
1619 1625
1620 default: 1626 default:
1621 return HttpStatus_500_InternalServerError; 1627 return HttpStatus_500_InternalServerError;
1622 } 1628 }
1623 } 1629 }