Bookshelf Home | Contents | Index | PDF |
Siebel Object Interfaces Reference > Programming > Siebel Object Interface Events and Siebel Extension Events > Error HandlingThis section explains the Siebel COM Interfaces error handling differences. COM Error HandlingThe errCode parameter is the standard last parameter for every COM Data Server interface method. It is not available in the COM Data Control, Mobile Web Client Automation Server, Web Client Automation Server, or Java Data Bean. The following examples illustrate the difference between calling a COM Data Server interface method and calling the version of the method that is compatible with COM Data Control and Mobile Web Client Automation Server. Error Handling Example—COMData Server onlyGetBusObject (BusObjectName as string, errcode as integer) -> businessObject Error Handling Example—COM Data Control and Mobile Web Client Automation ServerGetBusObject (BusObjectName as string) -> businessObject Java Error HandlingThe Siebel Java interfaces error-handling differences are explained in this section. Errors in the Siebel Java Data Bean are handled by the SiebelException object. It supports the getErrorCode() and getErrorMessage() methods. The SiebelException object is defined in com.siebel.data.SiebelException. It is used as follows: import com.siebel.data.SiebelException; For additional methods on the SiebelException object, refer to the Siebel Java Data Bean JavaDoc installed with Siebel Tools. Note that the JavaDoc is installed only if the "Siebel Java Integration" option is installed. If so, then a zipped file containing the JavaDoc is in the Error Message TrackingFor error message tracking in ActiveX, you can use either exceptions or methods. The following methods are available: EnableExceptions MethodEnableExceptions(enable as integer) The EnableExceptions method allows applications to use the native COM error-handling technique. If the method is about to fail due to error, then a COM exception is generated and the method does not return. The COM host receives the control instead. However, it may display the error message (this is default for Microsoft Internet Explorer or VB), but it can be changed by scripting. GetLastErrCode, GetLastErrText MethodAfter execution of a method, the GetLastErrCode can be invoked to check if any error was returned from the previous operation. The GetLastErrText method can be invoked to retrieve the text of the error message, for example: |
Siebel Object Interfaces Reference |