|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Utility class for handling HTTP and network error status codes from XNAT requests. More...
#include <QmitkHttpStatusCodeHandler.h>
Static Public Member Functions | |
| static bool | HandleErrorMessage (const char *_errorMsg) |
| Parse an error message from an XNAT HTTP request and display a user-facing warning dialog. More... | |
Utility class for handling HTTP and network error status codes from XNAT requests.
QmitkHttpStatusCodeHandler is a non-instantiable utility class that parses error messages returned by CTK XNAT HTTP requests, extracts the status code, and displays an appropriate warning message box to the user. It handles a wide range of Qt network error codes (connection errors, proxy errors, content errors, protocol errors, and server errors) as well as standard HTTP error codes.
Definition at line 34 of file QmitkHttpStatusCodeHandler.h.
|
static |
Parse an error message from an XNAT HTTP request and display a user-facing warning dialog.
Extracts the HTTP status code and server response from the error message string, then displays an appropriate QMessageBox warning. Consecutive duplicate error codes are suppressed to avoid flooding the user with repeated dialogs.
The expected error message format is:
| [in] | _errorMsg | The raw error message string from the CTK XNAT runtime exception. |
true if the error message was successfully parsed as an HTTP request failure, false otherwise. A general error dialog is shown for unparseable messages.