Fix try spawn actor catching too general exception

This commit is contained in:
nsubiron 2018-07-27 18:42:00 +02:00
parent 5b310cb541
commit 167cef21a0
1 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,8 @@
#include "carla/Logging.h"
#include <rpc/rpc_error.h>
namespace carla {
namespace client {
@ -17,7 +19,7 @@ namespace client {
Actor *parent) {
try {
return SpawnActor(blueprint, transform, parent);
} catch (const std::exception &e) {
} catch (const ::rpc::rpc_error &e) {
log_warning("TrySpawnActor: failed with:", e.what());
return nullptr;
}