Helix Web Services Client  1
Helix Web Services Client SDK for Qt Applications
Public Types | Public Member Functions | Static Public Attributes | List of all members
hws::RequestError Class Reference

Capture errors from different kinds of remote calls. More...

#include <RequestError.h>

Public Types

enum  Severity {
  EMPTY = 0, INFO = 1, WARN = 2, ERROR = 3,
  FATAL = 4
}
 

Public Member Functions

 RequestError ()
 Creates a new request status for a successful operation.
 
 RequestError (const QString &messageText, const QString &baseMessageText, int code, short severity)
 Create a request status from all fields of a failed request.
 
 RequestError (const RequestError &error)
 Copy the request error.
 
 ~RequestError ()
 Typical destructor.
 
RequestErroroperator= (const RequestError &e)
 Copy state from an existing RequestError.
 
const QString & messageText () const
 Possibly localized string coming from the server.
 
void setMessageText (const QString &t)
 Set the localized string.
 
const QString & baseMessageText () const
 Underling message, suitable for logging.
 
void setBaseMessageText (const QString &t)
 Underling message, suitable for logging.
 
int code () const
 See error code constants defined in RequestError.h.
 
void setCode (int c)
 See error code constants defined in RequestError.h.
 
short severity () const
 Current severity, probably ERROR.
 
void setSeverity (short s)
 Set the severity.
 

Static Public Attributes

static const int NETWORK_ERROR = 16000
 A generic networking problem (flagged by Qt)
 
static const int SSL_ERROR = 16001
 A networking problem with SSL (flagged by Qt subsystem)
 
static const int JSON_ERROR = 16002
 A problem parsing JSON.
 
static const int AUTHENTICATION_ERROR = 16003
 The session is likely invalid.
 
static const int WEB_SOCKET_ERROR = 16004
 Problems connecting to the notifications server.
 

Detailed Description

Capture errors from different kinds of remote calls.

Each request of the system might result in an error. Some errors - those typically in the 400 range - might have diagnostic information for the user. This mostly encapsulates the diagnostic information.

See our internal documentation page: https://confluence.perforce.com:8443/display/WS/Web+Services+Home

Member Enumeration Documentation

The severity of the problem.

For completeness, we include EMPTY, INFO, and WARN, which map to the severity of errors potentially reported by the underlying p4d instance. In practice, these should almost never happen.

Most errors will have ERROR level, which means you should not retry what you just did.

Errors at a FATAL level may require your client to stop accessing the server. Something very bad has occurred.


The documentation for this class was generated from the following files: