LBase::GetErrorFromList

#include "ltwrappr.h"

static L_INT LBase::GetErrorFromList (uIndex=LEAD_LAST_ERROR)

L_UINT uIndex;

/* index of the error to get from the list */

Retrieves an error code from the internal error list.

Parameter

Description

uIndex

The index of the error to get from the error list. If an invalid index is specified, the last error recorded will be returned.

Returns

SUCCESS

The internal error list was empty.

< 1

The error code of the error indexed by uIndex. Refer to Return Codes.

Comments

Call this function to retrieve an error code from the internal error list. The internal error list maintains a running list of the errors that have occurred in the LEADTOOLS C++ Class Library functions.

Required DLLs and Libraries

LTKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LBase::EnableAutoErrorDisplay, LBase::SetErrorString, LBase::DisplayError, LBase::SetErrorListDepth, LBase::IsAutoErrorDisplayEnabled, LBase::GetErrorFromList, LBase::GetErrorListDepth, LBase::ClearErrorList, LBase::GetErrorsNumber, LBase::DisplayErrorList, LBase::DisplayErrorFromList, LBase::RecordError, Class Members

Example

L_INT LBase__GetErrorFromListExample(HWND hWndParent)
{
	L_INT nRet;
   LBitmap MyBitmap;
   nRet = MyBitmap.Load(TEXT("%UserProfile%\\My Documents\\LEADTOOLS Images\\Image1.cmp"));
	if(nRet != SUCCESS)
		return nRet;
   nRet = MyBitmap.AddNoise();      
	if(nRet != SUCCESS)
		return nRet;
   if(LBase::GetErrorFromList()!=SUCCESS)
      LBase::DisplayErrorFromList(hWndParent);
	return SUCCESS;
}