My Project
SignOn::Error Class Reference

definition for Signon error handling. More...

Public Types

enum  ErrorType {
  Unknown = 1 , InternalServer = 2 , InternalCommunication = 3 , PermissionDenied = 4 ,
  EncryptionFailure , AuthServiceErr = 100 , MethodNotKnown , ServiceNotAvailable ,
  InvalidQuery , IdentityErr = 200 , MethodNotAvailable , IdentityNotFound ,
  StoreFailed , RemoveFailed , SignOutFailed , IdentityOperationCanceled ,
  CredentialsNotAvailable , ReferenceNotFound , AuthSessionErr = 300 , MechanismNotAvailable ,
  MissingData , InvalidCredentials , NotAuthorized , WrongState ,
  OperationNotSupported , NoConnection , Network , Ssl ,
  Runtime , SessionCanceled , TimedOut , UserInteraction ,
  OperationFailed , EncryptionFailed , TOSNotAccepted , ForgotPassword ,
  MethodOrMechanismNotAllowed , IncorrectDate , UserErr = 400
}
 Error codes for all the Signon by default supported errors. More...
 

Public Member Functions

 Error ()
 Constructor.
 
 Error (const Error &src)
 Copy constructor. More...
 
 Error (int type, const QString &message=QString())
 For convenience constructor. More...
 
Erroroperator= (const Error &src)
 Assignment operator. More...
 
virtual ~Error ()
 Destructor.
 
void setType (int type)
 Sets the type of the error. More...
 
void setMessage (const QString &message)
 Sets the error message. More...
 
int type () const
 
QString message () const
 

Detailed Description

definition for Signon error handling.

Extend this class' error range in order to provide custom error handling.

Attention
All this class' definitions must be inline.

Definition at line 49 of file signonerror.h.

Member Enumeration Documentation

◆ ErrorType

Error codes for all the Signon by default supported errors.

Plugin developers should use the predefined error types in the AuthSessionErr and UserErr interval, and in the case of extended error handling values greater than UserErr.

Attention
Error types lesser than Error::UserErr are reserved.
Enumerator
Unknown 

Catch-all for errors not distinguished by another code.

InternalServer 

Signon Daemon internal error.

InternalCommunication 

Communication with Signon Daemon error.

PermissionDenied 

The operation cannot be performed due to insufficient client permissions.

EncryptionFailure 

Failure during data encryption/decryption.

MethodNotKnown 

The method with this name is not found.

ServiceNotAvailable 

The service is temporarily unavailable.

InvalidQuery 

Parameters for the query are invalid.

MethodNotAvailable 

The requested method is not available.

IdentityNotFound 

The identity matching this Identity object was not found on the service.

StoreFailed 

Storing credentials failed.

RemoveFailed 

Removing credentials failed.

SignOutFailed 

SignOut failed.

IdentityOperationCanceled 

Identity operation was canceled by user.

CredentialsNotAvailable 

Query failed.

ReferenceNotFound 

Trying to remove nonexistent reference.

MechanismNotAvailable 

The requested mechanism is not available.

MissingData 

The SessionData object does not contain necessary information.

InvalidCredentials 

The supplied credentials are invalid for the mechanism implementation.

NotAuthorized 

Authorization failed.

WrongState 

An operation method has been called in a wrong state.

OperationNotSupported 

The operation is not supported by the mechanism implementation.

NoConnection 

No Network connetion.

Network 

Network connetion failed.

Ssl 

Ssl connection failed.

Runtime 

Casting SessionData into subclass failed

SessionCanceled 

Challenge was cancelled.

TimedOut 

Challenge was timed out.

UserInteraction 

User interaction dialog failed

OperationFailed 

Temporary failure in authentication.

EncryptionFailed 
Deprecated:
Failure during data encryption/decryption.
TOSNotAccepted 

User declined Terms of Service.

ForgotPassword 

User requested reset password sequence.

MethodOrMechanismNotAllowed 

Method or mechanism not allowed for this identity.

IncorrectDate 

Date time incorrect on device.

Definition at line 64 of file signonerror.h.

Constructor & Destructor Documentation

◆ Error() [1/2]

SignOn::Error::Error ( const Error src)
inline

Copy constructor.

Parameters
srcError object to be copied

Definition at line 139 of file signonerror.h.

◆ Error() [2/2]

SignOn::Error::Error ( int  type,
const QString &  message = QString() 
)
inline

For convenience constructor.

Parameters
typeType of the error
messageError message

Definition at line 150 of file signonerror.h.

Member Function Documentation

◆ message()

QString SignOn::Error::message ( ) const
inline
Returns
Error message

Definition at line 188 of file signonerror.h.

Referenced by operator=().

◆ operator=()

Error& SignOn::Error::operator= ( const Error src)
inline

Assignment operator.

Parameters
srcError object to be assigned to this instance

Definition at line 157 of file signonerror.h.

References message(), and type().

◆ setMessage()

void SignOn::Error::setMessage ( const QString &  message)
inline

Sets the error message.

Parameters
messageThe message to be set

Definition at line 178 of file signonerror.h.

◆ setType()

void SignOn::Error::setType ( int  type)
inline

Sets the type of the error.

The 'type' parameter is an integer and values beyond Error::ErrorType can be used for customized error reporting.

See also
Error::ErrorType.
Parameters
typeThe type to be set

Definition at line 172 of file signonerror.h.

◆ type()

int SignOn::Error::type ( ) const
inline
Returns
Type of the error

Definition at line 183 of file signonerror.h.

Referenced by operator=().


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