OpenPetra
Free Administration Software for Non-Profits
Ict.Common.ErrorCodes Class Reference

Contains Helper Methods for working with information that is associated with Error Codes. More...

Public Member Functions

ErrCodeCategory GetErrorCategory (string AErrorCode)
 Returns the error category for a specified error code. More...
 

Static Public Member Functions

static ErrCodeInfo GetErrorInfo (string AErrorCode)
 Returns an ErrCodeInfo object for a specified error code. More...
 
static ErrCodeInfo GetErrorInfo (string AErrorCode, string[] AErrorMessagePlaceholderTexts)
 Returns an ErrCodeInfo object for a specified error code. More...
 
static ErrCodeInfo GetErrorInfo (string AErrorCode, string AErrorMessageText, string[] AErrorMessagePlaceholderTexts=null, string[] AErrorTitlePlaceholderTexts=null)
 Returns an ErrCodeInfo object for a specified error code. More...
 
static string GetErrorText (string AErrorCode)
 Returns the error text (ShortDescription) for a specified error code. More...
 
static string GetErrorDescription (string AErrorCode)
 Returns the error description (FullDescription) for a specified error code. More...
 
static string GetErrorHelpID (string AErrorCode)
 Returns the error Help ID for a specified error code. More...
 

Detailed Description

Contains Helper Methods for working with information that is associated with Error Codes.

Member Function Documentation

◆ GetErrorCategory()

ErrCodeCategory Ict.Common.ErrorCodes.GetErrorCategory ( string  AErrorCode)
inline

Returns the error category for a specified error code.

Parameters
AErrorCodeError Code.
Returns
Error category for a specified error code.
Exceptions
NullReferenceExceptionThrown if the specified error code wasn't found.

◆ GetErrorDescription()

static string Ict.Common.ErrorCodes.GetErrorDescription ( string  AErrorCode)
inlinestatic

Returns the error description (FullDescription) for a specified error code.

Parameters
AErrorCodeError Code.
Returns
Error description (FullDescription) for a specified error code, or System.String.Empty if the error code was not found.

◆ GetErrorHelpID()

static string Ict.Common.ErrorCodes.GetErrorHelpID ( string  AErrorCode)
inlinestatic

Returns the error Help ID for a specified error code.

Parameters
AErrorCodeError Code.
Returns
Error Help ID for a specified error code.

◆ GetErrorInfo() [1/3]

static ErrCodeInfo Ict.Common.ErrorCodes.GetErrorInfo ( string  AErrorCode)
inlinestatic

Returns an ErrCodeInfo object for a specified error code.

Parameters
AErrorCodeError Code.
Returns
An ErrCodeInfo object which holds information about the specified error code, or null, if the error code was not found.

◆ GetErrorInfo() [2/3]

static ErrCodeInfo Ict.Common.ErrorCodes.GetErrorInfo ( string  AErrorCode,
string  AErrorMessageText,
string[]  AErrorMessagePlaceholderTexts = null,
string[]  AErrorTitlePlaceholderTexts = null 
)
inlinestatic

Returns an ErrCodeInfo object for a specified error code.

Parameters
AErrorCodeError Code.
AErrorMessageTextSet this to String.Empty to use the ErrCodeInfo.ShortDescription of the ErrCodeInfo, set it to any other string and this will be displayed instead.
AErrorMessagePlaceholderTextsArray whose strings are placed into placeholders which are found in AErrorMessageText (optional Argument!)

.

Parameters
AErrorTitlePlaceholderTextsArray whose strings are placed into placeholders which are found in the ErrorCode's ErrorTitle (optional Argument!)

. ///

Returns
An ErrCodeInfo object which holds information about the specified error code, or null, if the error code was not found.

◆ GetErrorInfo() [3/3]

static ErrCodeInfo Ict.Common.ErrorCodes.GetErrorInfo ( string  AErrorCode,
string[]  AErrorMessagePlaceholderTexts 
)
inlinestatic

Returns an ErrCodeInfo object for a specified error code.

Parameters
AErrorCodeError Code.
AErrorMessagePlaceholderTextsArray whose strings are placed into placeholders which are found in the ErrorCode's ErrorMessageText (optional Argument!)

.

Returns
An ErrCodeInfo object which holds information about the specified error code, or null, if the error code was not found.

◆ GetErrorText()

static string Ict.Common.ErrorCodes.GetErrorText ( string  AErrorCode)
inlinestatic

Returns the error text (ShortDescription) for a specified error code.

Parameters
AErrorCodeError Code.
Returns
Error text (ShortDescription) for a specified error code, or System.String.Empty if the error code was not found.

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