File ThrowAssert.hpp

Defines

throw_assert(EXPRESSION, MESSAGE)
namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

class AssertionFailureException : public std::exception
#include <Acts/Utilities/ThrowAssert.hpp>

Exception type for assertion failures This class captures the information available to the throw_assert macro.

Public Functions

inline AssertionFailureException(const std::string &expression, const std::string &file, int line, const std::string &msg)

Construct an assertion failure exception, captures macro info.

Parameters
  • expression – The expression being asserted

  • file – The current file

  • line – The current line

  • msg – The message to print if assertion fails

inline const char *what() const override

The assertion message.

Private Members

std::string report
class StreamFormatter
#include <Acts/Utilities/ThrowAssert.hpp>

Class which allows to use the << operator to assemble a string.

Public Functions

template<typename T>
inline StreamFormatter &operator<<(const T &value)

Stream operator which takes everything and forwards it to the stringstream.

Template Parameters

T – type of anything

Parameters

value – const ref to anything

Private Members

std::ostringstream stream