EMCECS / nfs-client-java

Native Java NFS client
Apache License 2.0
70 stars 33 forks source link

Add toString() methods to all request/response objects for easier debugging #11

Closed DavidASeibert closed 2 years ago

sgilhooly commented 6 years ago

Not sure if it's considered a request/response object but NfsStatus could also benefit from a toString to make error messages easier (possible) to diagnose. I'm curious why this class wasn't defined as an Enum which would have had a better default toString rendering but I'd settle for a better toString for sure.

The error message currently shows:

com.emc.ecs.nfsclient.nfs.NfsException: Error in NfsReaddirRequest serviceVersion:3 xid:-2034612967 usePrivilegedPort:false fileHandle:[1,2,3...] cookie:0 cookieverf0 error code:b>com.emc.ecs.nfsclient.nfs.NfsStatus@177ed3d3</b

twincitiesguy commented 2 years ago

I'm also not sure why this wasn't an enum, but probably to allow for additional (unknown) status codes. In any case, this should be addressed by #42.