long error messages truncated in ui app
I am having problems setting up callback actions in a custom TableView. My biggest problem is that the error messages are often too long to fit in the ui error dialog so they get truncated with ...(elipsis) so I don't know what to fix. I could post the code that fails but first is there anyway to get at the full error message.How do I trap an error calling a lambda in a ui callback. How do I put try catch around that? How do I override the ui builtin error handler.
mikael last edited by
@zencuke102, if needed, expand the error message popup, then tap Print Traceback. Close the error popup and see the full trace in console.
@mikael thanks. I see the traceback. I should have said that. I clicked all over that error dialog trying to get it to expand the error message. It shows the line of the error. It just doesn't show the complete error message because it doesn't fit in the TextField. So it clips the details of what is wrong and I can't figure it out from the part of the message it does print. And I can't figure out how to override the ui error handler with a handler that fixes this bug. The error happens when the callback is called. The arg list of the callback lambda is wrong so it refuses to call it and throws the exception instead. But the details of what is wrong with the arg list is in the clipped part of the error message.
I tried to install my own error handler by wrapping the top level view.present() with try...except but the ui built in handler still takes priority and my handler is ignored.
@mikael I have modified the callback several ways, guessing what might be wrong. All my guesses so far have failed. I am not experienced enough with python to make good enough guesses. I need the complete error message to make progress. I don't really understand how methods are implemented in python and I've never used lambdas before. The failing line of code combines both of my weak areas.
zencuke102 last edited by zencuke102
@mikael I reread your post and tried again. Print Traceback does show the complete error. Thanks. I had clicked it before but didn't realize it meant "print traceback in console window" even though that is obvious in retrospect. Where else would it print? Thanks again.
BTW closing the popup doesn't show the console. It just returns to the app. I had to quit the app which returned to the editor, then switch from the editor to the console see the traceback.