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
{{ message }}
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.
tango_admin --add-server DeviceRaiseFrom/test DeviceRaiseFrom test/deviceraisefrom/1python3 DeviceRaiseFrom.py test -v4
In itango3 I get:
In [1]: d = DeviceRaiseFrom('test/deviceraisefrom/1')
In [2]: d.attr1
PyDs_PythonError: Exception: err2
(For more detailed information type: tango_error)
In [3]: tango_error
Last tango error:
DevFailed[
DevError[
desc = Exception: err2
origin = File "/home/zreszela/workspace/pytango/tango/server.py", line 132, in read_attr
ret = worker.execute(read_method, self)
File "/home/zreszela/workspace/pytango/tango/green.py", line 98, in execute
return fn(*args, **kwargs)
File "DeviceRaiseFrom.py", line 13, in read_attr1
raise Exception("err2") from e
reason = PyDs_PythonError
severity = ERR]
DevError[
desc = Failed to read_attribute on device test/deviceraisefrom/1, attribute attr1
origin = DeviceProxy::read_attribute()
reason = API_AttributeFailed
severity = ERR]
]
In [4]: try:
...: raise Exception("err1")
...: except Exception as e:
...: raise Exception("err2") from e
...:
Exception: err2
(For more detailed information type: python_error)
In [5]:
In [5]: python_error
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-4-055cdc174ea6> in <module>()
1 try:
----> 2 raise Exception("err1")
3 except Exception as e:
Exception: err1
The above exception was the direct cause of the following exception:
Exception Traceback (most recent call last)
<ipython-input-4-055cdc174ea6> in <module>()
2 raise Exception("err1")
3 except Exception as e:
----> 4 raise Exception("err2") from e
Exception: err2
As you can see in PyTango the info about the original exception is lost.
The text was updated successfully, but these errors were encountered:
I would like that the exception chain is propagated to the client.
I have the following device server:
I run it in the following way:
In itango3 I get:
As you can see in PyTango the info about the original exception is lost.
The text was updated successfully, but these errors were encountered: