You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, when you get a NoNodeError, all we see is NoNodeError((), {}), when NoNodeError("/path/to/node") would be much more useful.
This is because exceptions are handled in a completely generic way by the protocol-level code; instead of the create function checking a response code and creating a NoNodeError(path), we have, in serialization.py, response = EXCEPTIONS[response](), and that part of the protocol code doesn't have access to any useful information to provide to the exceptions.
Related, the EXCEPTIONS dict for some reason is not made up of the classes directly, but rather little wrapper functions that look like this:
I have no idea why; it almost seems like a mistake that it was defined to return klass(args, kwargs) instead of klass(*args, **kwargs), or of course, more simply foregoing the create function entirely and just putting the klass directly into the EXCEPTIONS dict.
The text was updated successfully, but these errors were encountered:
For example, when you get a NoNodeError, all we see is
NoNodeError((), {})
, whenNoNodeError("/path/to/node")
would be much more useful.This is because exceptions are handled in a completely generic way by the protocol-level code; instead of the
create
function checking a response code and creating aNoNodeError(path)
, we have, inserialization.py
,response = EXCEPTIONS[response]()
, and that part of the protocol code doesn't have access to any useful information to provide to the exceptions.Related, the
EXCEPTIONS
dict for some reason is not made up of the classes directly, but rather little wrapper functions that look like this:I have no idea why; it almost seems like a mistake that it was defined to return
klass(args, kwargs)
instead ofklass(*args, **kwargs)
, or of course, more simply foregoing thecreate
function entirely and just putting the klass directly into theEXCEPTIONS
dict.The text was updated successfully, but these errors were encountered: