How do I get the exception details in UIFlow?
-
Hi all,
I am using UIFlow.
I want to get the detailed contents of the exception when it occurs.
Using the try~except block, I can define the behavior when an exception occurs, but I cannot get the details of the exception.
Is there any way to get the details of the exception?Thank you for help.
-
try: # some code except Exception as e # print to serial console print( str(e) ) # or store in variable
If you connect device trought usb, you could see all output in serial terminal.
-
There isn't a console for capturing exceptions in UIFLow, I use the Thonny IDE and run a console in that to capture errors and exceptions.
-
I decided to use TeraTerm to refer to the COM port information.
When an Exception occurred, the detailed information was displayed in TeraTerm.
Don't forget to set the Baud rate to 115200 for TeraTerm!The attached image shows the Exception displayed when I tried to connect to IoT Central without connecting to Wi-Fi.
Thank you for help.
-
@ajb2k3 That's a great tip! It's also a good way to quick debug the code using REPL.
-
@go-ozeki said in How do I get the exception details in UIFlow?:
TeraTerm
Hi how do you connect TeraTerm to uniflow? I'm using Uniflow both online and desktop (under linux) but I don't see how to get the console, if I use screen /dev/ttyUSB0 I get the serial output but then uniflow does not work anymore, I do you get both? -
@ajb2k3
Hi I tried to connect Thonny to my M5stack Core 2 but with no success, I when I set the port to esp32 and /dev/USB0 I get some serial port messages but the device is not recognized and I cannot program it with Thonny. Same with mu.
Can you please help? -
@dave17 said in How do I get the exception details in UIFlow?:
@ajb2k3
Hi I tried to connect Thonny to my M5stack Core 2 but with no success, I when I set the port to esp32 and /dev/USB0 I get some serial port messages but the device is not recognized and I cannot program it with Thonny. Same with mu.
Can you please help?What kind of messages?
Have you set Thonny or mu to communicate correctly?
Have you Hit CTRL+C to stop the running Micropython code in order to to get into REPL?