[progress Communities] [progress Openedge Abl] Forum Post: More Error-handling 101

  • Thread starter Thread starter Jeff Ledbetter
  • Start date Start date
Status
Not open for further replies.
J

Jeff Ledbetter

Guest
Hi. In the code below, the doIt() always returns the unknown(?) value. In the CATCH block I can see there is a value for c that has been fetched from e:getMessage(1). I can make this work by putting my FIND and CATCH in its own DO block but I was just curious why it behaves the way it does. What nuance am I misunderstanding? USING PROGRESS.lang.*. FUNCTION doIt RETURNS CHARACTER(): DEFINE VARIABLE c AS CHARACTER NO-UNDO. FIND Customer NO-LOCK WHERE Customer.Name = "xxx". RETURN c. CATCH e AS SysError: c = e:GetMessage(1). MESSAGE c VIEW-AS ALERT-BOX INFORMATION BUTTONS OK. END CATCH. END FUNCTION. MESSAGE doIt() VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.

Continue reading...
 
Status
Not open for further replies.
Back
Top