` Printed Icetips Article

Icetips Article



Par2: Getting Errorcode from ABC method
2004-06-07 -- Carl Sumner
 
(In C55)
 1. The Errorcode is often lost due to the Filemanager doing other
calls before returning.
 2. There is another call that has a saved copy of Errorcode,
"FileManager.GetError".
 3. The Filename is sometimes not filled in correctly. There is a
patch on this newsgroup for this.
 4. If you use "Try" methods, as you should, you must Throw (show) any
other errors that occur or they will not be seen.

 I use something like this:

-------------------------------------
    RetVal = Access:HCOMINV.TryFetch(COM:NVITMidx)
    IF RetVal = Level:Benign THEN
      !Do something
    ELSIF Access:HCOMINV.GetError() = 0 THEN   !Msg:AbortReading
      !Done, do something else
    ELSE            !Error
      GlobalErrors.ThrowFile(Access:HCOMINV.GetError(),'Fetch Error on
HCOMINV')
      ThisWindow.Response = RequestCompleted
      ReturnValue = Level:Fatal
    END
-------------------------------------



Printed November 21, 2024, 7:03 am
This article has been viewed/printed 35224 times.