Qx v0.5.8
Qt Extensions Library
Loading...
Searching...
No Matches
Qx::IError Class Reference

IError defines the baseline inheritance interface for Qx error types. More...

#include <qx/core/qx-abstracterror.h>

Public Member Functions

bool operator!= (const IError &other) const =default
 
bool operator== (const IError &other) const =default
 

Protected Member Functions

 IError ()=default
 
virtual QString deriveCaption () const
 
virtual QString deriveDetails () const
 
virtual QString derivePrimary () const
 
virtual QString deriveSecondary () const
 
virtual Severity deriveSeverity () const
 
virtual quint32 deriveValue () const
 

Friends

class Error
 

Detailed Description

Warning
Do not inherit from this class directly. Instead, see AbstractError.

Constructor & Destructor Documentation

◆ IError()

Qx::IError::IError ( )
protecteddefault

Constructs an IError.

Member Function Documentation

◆ deriveCaption()

QString Qx::IError::deriveCaption ( ) const
protectedvirtual

Returns the standard equivalent caption of the type specific error. Ignored if deriveValue() returns 0.

This function is called by Error. Reimplement this function when creating a subclass of AbstractError. Generally this should return an empty string when deriveValue() returns 0.

The default implementation returns an empty string.

◆ deriveDetails()

QString Qx::IError::deriveDetails ( ) const
protectedvirtual

Returns the standard equivalent details of the type specific error. Ignored if deriveValue() returns 0.

This function is called by Error. Reimplement this function when creating a subclass of AbstractError. Generally this should return an empty string when deriveValue() returns 0.

The default implementation returns an empty string.

◆ derivePrimary()

QString Qx::IError::derivePrimary ( ) const
protectedvirtual

Returns the standard equivalent primary information of the type specific error. Ignored if deriveValue() returns 0.

This function is called by Error. Reimplement this function when creating a subclass of AbstractError. Generally this should return an empty string when deriveValue() returns 0.

The default implementation returns an empty string.

◆ deriveSecondary()

QString Qx::IError::deriveSecondary ( ) const
protectedvirtual

Returns the standard equivalent secondary information of the type specific error. Ignored if deriveValue() returns 0.

This function is called by Error. Reimplement this function when creating a subclass of AbstractError. Generally this should return an empty string when deriveValue() returns 0.

The default implementation returns an empty string.

◆ deriveSeverity()

Severity Qx::IError::deriveSeverity ( ) const
protectedvirtual

Returns the standard equivalent severity of the type specific error.

This function is called by Error. Reimplement this function when creating a subclass of AbstractError.

The default implementation returns Err.

◆ deriveValue()

quint32 Qx::IError::deriveValue ( ) const
protectedvirtual

Returns the standard equivalent error value of the type specific error.

This function is called by Error. Reimplement this function when creating a subclass of AbstractError. It should return 0 when the error is to be invalid (i.e. a non-error/successful outcome).

The default implementation simply returns 0, meaning only invalid errors will be produced.

◆ operator!=()

bool Qx::IError::operator!= ( const IError & other) const
default

Returns true if this error is not the same as other; otherwise, returns false.

◆ operator==()

bool Qx::IError::operator== ( const IError & other) const
default

Returns true if this error is the same as other; otherwise, returns false.

See also
equivalent().

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