mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-13 02:56:59 +00:00
Add string messages to returned result codes to display to user
* Most of the main entry points that can fail with relevant reasons now has a way of specifying a message to return with it. This message can be displayed to the user to give more information or context about an error.
This commit is contained in:
@@ -43,18 +43,18 @@ If the connection fails, normally we must fail but if we have a device protocol
|
||||
.. highlight:: python
|
||||
.. code:: python
|
||||
|
||||
if status == rd.ReplayStatus.NetworkIOFailed and protocol is not None:
|
||||
if result == rd.ResultCode.NetworkIOFailed and protocol is not None:
|
||||
# If there's just no I/O, most likely the server is not running. If we have
|
||||
# a protocol, we can try to start the remote server
|
||||
print("Couldn't connect to remote server, trying to start it")
|
||||
|
||||
status = protocol.StartRemoteServer(URL)
|
||||
result = protocol.StartRemoteServer(URL)
|
||||
|
||||
if status != rd.ReplayStatus.Succeeded:
|
||||
raise RuntimeError(f"Couldn't launch remote server, got error {str(status)}")
|
||||
if result != rd.ResultCode.Succeeded:
|
||||
raise RuntimeError(f"Couldn't launch remote server, got error {str(result)}")
|
||||
|
||||
# Try to connect again!
|
||||
status,remote = rd.CreateRemoteServerConnection(URL)
|
||||
result,remote = rd.CreateRemoteServerConnection(URL)
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
Reference in New Issue
Block a user