CARLA
Loading...
Searching...
No Matches
test.cpp
Go to the documentation of this file.
1// Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#ifdef LIBCARLA_NO_EXCEPTIONS
8
9#include <carla/Exception.h>
10#include <carla/Logging.h>
11
12#include <exception>
13
14namespace carla {
15
16 void throw_exception(const std::exception &e) {
17 log_critical("carla::throw_exception:", e.what());
18 log_critical("calling std::terminate because exceptions are disabled.");
19 std::terminate();
20 }
21
22} // namespace carla
23
24#endif // LIBCARLA_NO_EXCEPTIONS
25
26#include "Random.h"
27
28namespace util {
29
30 thread_local std::mt19937_64 Random::_engine((std::random_device())());
31
32} // namespace util
static thread_local std::mt19937_64 _engine
Definition Random.h:37
This file contains definitions of common data structures used in traffic manager.
void throw_exception(const ExceptionT &e)
Templated on the static type so the thrown object keeps its dynamic type: taking a const std::excepti...
Definition Exception.h:44
static void log_critical(Args &&... args)
Definition Logging.h:124