error::backtrace() raises an error
Praxis
Posts: 274
e.backtrace() raises TypeError: Result of expression 'e.backtrace' [undefined] is not a function.
Happens in both DS v21.0.6 Beta and DS v4.24.0.3 Beta
OS: Win11 64bit
Am I doing something wrong?, or is this a bug?, or a documentation problem?
Example code:
try {
NonExistentVar.Property = 77;
} catch(e) {
print( e.toString() ); // ReferenceError: Can't find variable: NonExistentVar
print( e.backtrace() ) // >>> raises TypeError: Result of expression 'e.backtrace' [undefined] is not a function.
}
Post edited by Praxis on

Comments
We are told this appears to be a documentation error.
OK - thank you Richard (and Rob).
A bit moe inforamtion. It was an error in the DS 4 scripting documents, which has now been corrected. It was in the DS 3 QSA Error object. I am told the report by Google AI here https://www.google.com/search?q=Qt+3+QSA+Error+object+properties+and+functions is correct
Thanks for the link.
I suspect it was only intended to work in "debug" versions of apps.
It did wwork in DS 3, but it depended on the older QSA scripting engine that was not available for the version of Qt used for DS4 (which is why older scripts have to be converted on loading, a feature that is not available for newer Qt versions and so will not be in DS 2025+ - see https://www.daz3d.com/forums/discussion/comment/9137811/#Comment_9137811 ) QSA also had nice auto-complete features.
Thanks for that info. Ahhh... the good old days... :)