mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +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:
@@ -597,10 +597,10 @@ void RemoteManager::on_connect_clicked()
|
||||
}
|
||||
else
|
||||
{
|
||||
ReplayStatus status = ReplayStatus::Succeeded;
|
||||
LambdaThread *th = new LambdaThread([&host, &status]() {
|
||||
ResultDetails result = {ResultCode::Succeeded};
|
||||
LambdaThread *th = new LambdaThread([&host, &result]() {
|
||||
IRemoteServer *server = NULL;
|
||||
status = host.Connect(&server);
|
||||
result = host.Connect(&server);
|
||||
if(server)
|
||||
server->ShutdownServerAndConnection();
|
||||
});
|
||||
@@ -615,9 +615,9 @@ void RemoteManager::on_connect_clicked()
|
||||
|
||||
setRemoteServerLive(node, false, false);
|
||||
|
||||
if(status != ReplayStatus::Succeeded)
|
||||
if(!result.OK())
|
||||
RDDialog::critical(this, tr("Shutdown error"),
|
||||
tr("Error shutting down remote server: %1").arg(ToQStr(status)));
|
||||
tr("Error shutting down remote server: %1").arg(result.Message()));
|
||||
}
|
||||
|
||||
// kick off a thread to check the status
|
||||
|
||||
Reference in New Issue
Block a user