These are generic utility classes and functions within the Platform Layer.
More...
Classes |
class | DateTime |
| Represents a date convertable among various standard date represenations including RFC 3339 used by JSON encodings. More...
|
Functions |
util::error::Code | ErrnoCodeToStatusEnum (int errno_code) |
| Determine status error::Code to use from a standard Posix errno code.
|
util::Status | StatusFromErrno (int errno_code, const StringPiece &msg="") |
| Create a status from a standard Posix errno code.
|
util::error::Code | HttpCodeToStatusEnum (int http_code) |
| Determine status error::Code to use from a standard HTTP response status code.
|
const string | HttpCodeToHttpErrorMessage (int http_code) |
| Determine the standard HTTP error message for a given code.
|
util::Status | StatusFromHttp (int http_code, const StringPiece &msg="") |
| Create a status from a standard HTTP response status code.
|
Detailed Description
These are generic utility classes and functions within the Platform Layer.
Function Documentation
Determine status error::Code to use from a standard Posix errno code.
This is more a suggestion than a definitive mapping.
- Parameters:
-
[in] | errno_code | A posix errno. |
- Returns:
- error code to use when creating a status for the Posix error.
Determine the standard HTTP error message for a given code.
- Parameters:
-
[in] | http_code | An HTTP response status code. |
- Returns:
- short capitalized error phrase.
Determine status error::Code to use from a standard HTTP response status code.
This is more a suggestion than a definitive mapping.
- Parameters:
-
[in] | http_code | An HTTP response status code. |
- Returns:
- error code to use when creating a status for the HTTP status code.
Create a status from a standard Posix errno code.
- Parameters:
-
[in] | errno_code | A posix errno. |
[in] | msg | A detailed message explanation can be empty to use a generic explanation based on the errno_code. |
- Returns:
- The status returned will be ok for errno_code 0, otherwise, it will be some form of failure.
Create a status from a standard HTTP response status code.
- Parameters:
-
[in] | http_code | An HTTP status response code. |
[in] | msg | A detailed message explanation can be empty to use a generic explanation based on the http_code. |
- Returns:
- The status returned will be ok for 2xx series responses, otherwise, it will be some form of failure.