Qt-interest Archive, July 2007
Re: QtScript: throwing an Error with traceback stack
Message 1 in thread
Hi Seneca,
Just a note regarding the throwScriptError code. I was talking to Kent
last week and he suggested using throwError() and then using its
return value if you need to add additional information to the
exception. That avoids the need to do the evaluate("new Error()")
work-around I suggested.
Cheers
Rich.
--
[ signature omitted ]
Message 2 in thread
> Just a note regarding the throwScriptError code. I was talking to Kent
> last week and he suggested using throwError() and then using its
> return value if you need to add additional information to the
> exception. That avoids the need to do the evaluate("new Error()")
> work-around I suggested.
While playing with it I also found that would work. However it seemd not
very "clean" in respect that a future version of QtScript could possibly
react asynchronous to throwError() in some way, rendering those
manipulations on the Error object invalid. So atm I'm sticking with the
evaluate("new Error()") workaround. After all the slight overhead does not
weight too much, since my applications should not be throwing
exceptions/Errors too frequent ;)
--
[ signature omitted ]