ImageGear Professional for Windows ActiveX
IGResult Object

Description:

This object is contained inside the IGCoreCtl Control and provides error handling capabilities. ImageGear employs unified error handling. Each time an error occurs inside ImageGear it's placed onto error stack. There are two types of errors - severe errors (that are commonly referred to as errors) that make it impossible to complete an operation and warnings that make possible to complete the operation while signaling that something went wrong. Error stack contains all errors and warnings after each ImageGear API call, that happened during the execution of this API call. One way to handle the errors is to check the number of errors on the stack after calling ImageGear API. However such approach can be tedious and often times it's convenient to establish few error handling procedures for processing of multiple error conditions. To provide for the more convenient error handling ImageGear provides the following error notification capabilities:

ImageGear can raise an OLE error condition at the end of every API call if at least one error happened during the execution of the API. This makes it possible to setup a single error handling procedure (e.g. `On Error' statement in Visual Basic) and transfer control to it when an error happens without verifying error condition separately after each API call.

ImageGear can fire an IGError Event when an error or warning is added to the error stack.

The error handling is configured via the NotificationFlags Property. Its values can be comprised from the following flags, any of whose can be combined:

The default value of NotificationFlags Propertyis IG_ERR_OLE_ERROR or IG_ERR_EVENT_WARNING.

An error is a result record with the level equal to 0, while a warning is a result error with the level greater than 0.

Interface:

IIGResult

Members:

Methods
AddRecord Method This method adds a new record to the stack.
Clear Method This method clears all records from the stack.
GetError Method This method creates a new object and copies info about IG error into it.
GetRecord Method This method creates a new object and copies info about IG result record into it.
GetRecordWithLevel Method This method creates a new object and copies info about IG result record with the specified level into it.
Properties
ErrorCount Property This property returns the total number of errors (records with level 0) on the stack.
IsOK Property This property tells whether there are any errors (records with level 0) on the stack.
NotificationFlags Property This property configures ImageGear error handling mechanism.
RecordCount Property This indexed property returns the number of records of the specified level on the stack.
RecordsTotal Property This property returns the total number of records on the stack.

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback