Grid Community Toolkit
6.2.1653033972 (tag: v6.2.20220524)
|
GRAM Error Messages. More...
Functions | |
const char * | globus_gram_protocol_error_string (int error_code) |
Get a description of a a GRAM error code. More... | |
void | globus_gram_protocol_error_7_hack_replace_message (const char *message) |
Replace the error message associated with error 7 with a custom message. More... | |
void | globus_gram_protocol_error_10_hack_replace_message (const char *message) |
Replace the error message associated with error 10 with a custom message. More... | |
GRAM Error Messages.
Functions in this section handle converting GRAM error codes to strings which can help the user diagnose GRAM problems.
void globus_gram_protocol_error_10_hack_replace_message | ( | const char * | message | ) |
Replace the error message associated with error 10 with a custom message.
The globus_gram_protocol_error_10_hack_replace_message() function creates a custom version of the error message for the error GLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED. The string pointed to by the message parameter is copied to thread-local storage, and subsequent calls to globus_gram_protocol_error_string() with this error number will return this copy of the string. Each time globus_gram_protocol_error_10_hack_replace_message() is called for a particular thread, the previous message is freed.
The purpose of this function is to allow more meaningful error messages to be generated when protocol errors occur. In particular, the specific XIO error reason can be used in place of a generic protocol failure message.
message | The new message to be associated with the GLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED error code. |
void globus_gram_protocol_error_7_hack_replace_message | ( | const char * | message | ) |
Replace the error message associated with error 7 with a custom message.
The globus_gram_protocol_error_7_hack_replace_message() function creates a custom version of the error message for the error GLOBUS_GRAM_PROTOCOL_ERROR_AUTHORIZATION. The string pointed to by the message parameter is copied to thread-local storage, and subsequent calls to globus_gram_protocol_error_string() with this error number will return this copy of the string. Each time globus_gram_protocol_error_7_hack_replace_message() is called for a particular thread, the previous message is freed.
The purpose of this function is to allow more meaningful error messages to be generated when authentication failures occur. In particular, the specific GSSAPI error reason can be used in place of a generic authorization failure message.
message | The new message to be associated with the GLOBUS_GRAM_PROTOCOL_ERROR_AUTHORIZATION error code. |
const char* globus_gram_protocol_error_string | ( | int | error_code | ) |
Get a description of a a GRAM error code.
The globus_gram_protocol_error_string() function takes a GRAM error code value and returns the associated error code string for the message. The string is statically allocated by the GRAM Protocol library and should not be modified or freed by the caller. The string is intended to complete a sentence of the form "[operation] failed because ..."
error_code | The error code to translate into a string. |