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.

    0_1636334242899_c385a81a-18d2-431a-ba6c-0d0c7b93ee16-image.png