Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Show all _error information on error
#1
Is there some way to configure QM GUI to -- when an error occurs in my macro -- automatically print all the _error info to the output pane?

Now it just shows:
Code:
Copy      Help
Error (RT) in My First Macro:  failed.    ?"
I'd really like to see the line number. In fact I would like to see all the _error information.

Code:
Copy      Help
str s
err
,out "An error occurred"
,out s.format("Macro: %s" s.getmacro(_error.iid 1))
,out s.format("Line number: %d" _error.source)
,out s.format("Desc: %s" _error.description)
,out s.format("Code: %d" _error.code)
,out s.format("Place: %d" _error.place)
,out s.format("Line: %s" _error.line)

But I don't want to put this code in all of my macros. I know... I can create a function that contains this code. But can I register a global error handler so that all of my macros print this information without any special instructions added to each of my macros?

Do I have to add "atend MaybePrintErrorsOut" to all my macros?

Does QM come with a built-in function that will format _error into a nice report string for printing into dialog/stdout/logfile?

I was surprised that QM does not by default show a line number upon error. Usually to be user friendly there is a link you can click to jump the editor to the line Smile

But it's okay. I'm just curious.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)