Fix try spawn actor catching too general exception
This commit is contained in:
parent
5b310cb541
commit
167cef21a0
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue