How are errors handled?
All the RainierFun components handle errors using a similar mechanism. Each time a function is called, information is written to a.ERR file (eg RNWINFUN.ERR). This information includes the return code and any error text and is written whether the function succeeded or failed. The error information can be returned to the COOL:Gen action diagram with functions included in the components (e.g. rnGetLastErrorNumber and rnGetLastErrorText). Most functions return negative values in error situations so after a call to a function you may include logic like this: IF local ole return_code IS LESS THAN 0 SET local ole return_text TO local ole guiobject .rnGetLastErrorText … (error display and/or handling) This means that you can trap errors, display your own message boxes if you wish and take any other appropriate action. This is not generally possible when driving OLE servers natively with COOL:Gen.