slowtec / tokio-modbus

A tokio-based modbus library
Apache License 2.0
379 stars 117 forks source link

Publicly export `ExceptionResponse` and `Exception` types #218

Closed Stupremee closed 5 months ago

Stupremee commented 10 months ago

By making these types public, one is able to get the specific modbus error from a Modbus server.

So this is a short-term solution for #169, but it's definitely not a good one.

uklotzde commented 10 months ago

Please rebase on main to fix the unrelated pre-commit issues.

uklotzde commented 10 months ago

How about a code example? Could we add error handling to one of the existing examples or (even better) a doctest example?

Stupremee commented 10 months ago

Yep that's a good idea. Will add it tomorrow!

uklotzde commented 5 months ago

Closing in favor of #246.