Skip to content

How to get the specific error message #133

Open
@RobinGalipeau

Description

Hi, I have a question, I am unable to extract the exact error message when a communication fail.
how to extract the exception code, a parity error message, bad CRC, or timeout?

Currently I can get the generic error flag but I don't understand how to evaluate the different cause.
my current code look like that:

 try :
         list = CImod.read_registers(14,2,4)
except IOError:
         print("COMs error occured")

thank you.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions