TErrorContext defines used error contexts (see the Error contexts table below).
Error contexts.
TErrorContext | |
ECtxAutomatic = 0 | This means that all error codes are unique. This is a default value when resolving errors. |
ECtxNoCtx = 1 | If this context is used, context text is not added to the beginning of the resolved error text e.g. “General”. The context separator is still added. |
ECtxNoCtxNoSeparator = 2 | if this context is used, neither context text nor the context separator is added to the beginning of the resolved error text. |
The Usage of the flags (defined in textresolver.hrh) table below describes usage of the flag parameter in ResolveErrorString method.
Usage of the flags (defined in textresolver.hrh).
Constant | Usage |
ETextResolverPanicErrorFlag
= 0x00000001 |
For internal use. |
ETextResolverBlankErrorFlag = 0x00000002 | This is used to tell that error has no proper explanation. |
ETextResolverUnknownErrorFlag = 0x00000004 | Indicates that Text Resolver does not support the error. Text Resolver will also set ETextResolverBlankErrorFlag to on when returning flags. The error can be unsupported because it’s not found from resource files or it’s marked as unsupported in the resource file. |
EErrorResOOMFlag = 0x00000008 | Flag is returned while processing KErrNoMemory error code. Due to the low memory situation the error code is processed in a special way. Error resolving was performed successfully. |
CTextResolver
void LoadCommonTextsL()
static CTextResolver* NewL()
static CTextResolver* NewL(CCoeEnv& aEnv)
static CTextResolver* NewLC()
CTextResolver* NewLC(CCoeEnv& aEnv)
const TDesC& ResolveErrorString( TInt aError, TErrorContext aContext = ECtxAutomatic)
const TDesC& ResolveErrorString( TInt aError, TInt& aTextId, TUint& aFlags, TErrorContext aContext = ECtxAutomatic)