2019-01-26 20:23:52 +08:00
|
|
|
// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
|
|
|
|
// de Barcelona (UAB).
|
|
|
|
//
|
|
|
|
// This work is licensed under the terms of the MIT license.
|
|
|
|
// For a copy, see <https://opensource.org/licenses/MIT>.
|
|
|
|
|
2019-01-27 00:27:14 +08:00
|
|
|
#ifdef LIBCARLA_NO_EXCEPTIONS
|
|
|
|
|
2019-01-26 20:23:52 +08:00
|
|
|
#include <carla/Exception.h>
|
|
|
|
#include <carla/Logging.h>
|
|
|
|
|
|
|
|
#include <exception>
|
|
|
|
|
|
|
|
namespace carla {
|
|
|
|
|
|
|
|
void throw_exception(const std::exception &e) {
|
2019-01-27 00:27:14 +08:00
|
|
|
log_critical("carla::throw_exception:", e.what());
|
|
|
|
log_critical("calling std::terminate because exceptions are disabled.");
|
|
|
|
std::terminate();
|
2019-01-26 20:23:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace carla
|
2019-01-27 00:27:14 +08:00
|
|
|
|
|
|
|
#endif // LIBCARLA_NO_EXCEPTIONS
|
2019-03-26 06:17:08 +08:00
|
|
|
|
|
|
|
#include "Random.h"
|
|
|
|
|
|
|
|
namespace util {
|
|
|
|
|
|
|
|
thread_local std::mt19937_64 Random::_engine((std::random_device())());
|
|
|
|
|
|
|
|
} // namespace util
|