Exception handling prints stack trace to stdout
Brought to you by:
wimpi
The method ModbusTCPTransport.readResponse()
blindly catches all Exception
s and prints the stack trace before throwing a new ModbusIOException
. The ModbusIOException
should wrap the underlying Exception
as its cause. At the very least, Modbus.debug
should be consulted before printing anything to standard out.
This isn't the only place where ex.printStackTrace()
is called - they should all be visited with this in mind.
Greets,
I've not had a chance to go through all of j2mod and make the change that you've requested, though I personally find it annoying. I've tried goading Dieter into fixing jamod over the years, without much success. If this issue is keeping you from using jamod, please take a look at j2mod and I'd be more than happy to do the cleanup work you're looking for.
Duplicate of: https://sourceforge.net/p/jamod/bugs/53/