Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about error trapping..
#1
Hi -

Is there any mechanism that catches all of the errors in a thread to prevent the crash of an *.exe generated by QM? I know that I can put an 'err' to catch an error from a particular function call - but I was hoping that there would be something like a try{}catch{} block. I want to move my codebase to a consistent robust style and I'm looking for suggestions.

If I use an atend to log the errors - say something like
Code:
Copy      Help
atend logMyError
act 0
... does this prevent error from crashing?

Or is it safer to have the routines invoked by a 'mac' have the following structure?
Code:
Copy      Help
myFunction
err
   out F"Caught error {_error.description}"
so that the thrown errors don't kill the compiled *.exe.

In general I believe that errors should be handled locally - this is just for the unexpected ones until we fix the issue.
#2
Quote:Is there any mechanism that catches all of the errors in a thread to prevent the crash
No. QM does not have try/catch. Errors can be either handled locally or explicitly passed to the caller.

Function Function294
Code:
Copy      Help
Function299

err+
,out _error.description

Function Function299
Code:
Copy      Help
opt noerrorshere 1

act 0


Forum Jump:


Users browsing this thread: 1 Guest(s)