userver: utils::TracefulExceptionBase Class Reference
Loading...
Searching...
No Matches
utils::TracefulExceptionBase Class Referenceabstract

#include <userver/utils/traceful_exception.hpp>

Detailed Description

Base class implementing backtrace storage and message builder, published only for documentation purposes, please inherit from utils::TracefulException instead.

Definition at line 23 of file traceful_exception.hpp.

+ Inheritance diagram for utils::TracefulExceptionBase:

Public Types

enum class  TraceMode {
  kAlways ,
  kIfLoggingIsEnabled
}
 
using MemoryBuffer = fmt::basic_memory_buffer<char, kInlineBufferSize>
 

Public Member Functions

 TracefulExceptionBase (std::string_view what)
 
 TracefulExceptionBase (TraceMode trace_mode)
 
 TracefulExceptionBase (TracefulExceptionBase &&) noexcept
 
const MemoryBuffer & MessageBuffer () const noexcept
 
const boost::stacktrace::basic_stacktrace & Trace () const noexcept
 

Static Public Attributes

static constexpr size_t kInlineBufferSize = 100
 

Member Typedef Documentation

◆ MemoryBuffer

using utils::TracefulExceptionBase::MemoryBuffer = fmt::basic_memory_buffer<char, kInlineBufferSize>

Definition at line 31 of file traceful_exception.hpp.

Member Enumeration Documentation

◆ TraceMode

enum class utils::TracefulExceptionBase::TraceMode
strong

Definition at line 25 of file traceful_exception.hpp.

Friends And Related Symbol Documentation

◆ operator<<

template<typename Exception , typename T >
std::enable_if< std::is_base_of< TracefulExceptionBase, typenamestd::remove_reference< Exception >::type >::value, Exception && >::type operator<< ( Exception && ex,
const T & data )
friend

Stream-like interface for message extension.

Definition at line 50 of file traceful_exception.hpp.

Member Data Documentation

◆ kInlineBufferSize

constexpr size_t utils::TracefulExceptionBase::kInlineBufferSize = 100
staticconstexpr

Definition at line 30 of file traceful_exception.hpp.


The documentation for this class was generated from the following file: