8#ifndef HPP_ALIB_CAMP_MESSAGE_EXCEPTION
9#define HPP_ALIB_CAMP_MESSAGE_EXCEPTION 1
14#include "alib/enums/records.hpp"
17namespace alib {
namespace lang {
164 template<
typename TIntegral>
165 Exception( TIntegral initialBufferSizeInKB,
int bufferGrowthInPercent= 100 )
166 :
TSharedMonoVal( size_t(initialBufferSizeInKB), bufferGrowthInPercent )
168 static_assert( !std::is_integral<TIntegral>::value,
169 "Erroneous use of Exception constructor overload which expects an integral "
170 "value as first parameter to determine the size of the first memory buffer." );
190 template<
typename TEnum,
typename... TArgs >
195 Add( ci, type, std::forward<TArgs>(args)... );
267 template <
typename TEnum,
typename... TArgs>
inline
272 newMessage->
Add( std::forward<TArgs>( args )... );
336 template<
typename TConstOrMutableMessage>
362 :
p(const_cast<detail::ExceptionEntry*>(entry))
503namespace alib {
namespace strings {
505namespace APPENDABLES {
bool operator!=(IteratorType other) const
detail::ExceptionEntry * p
The pointer to the actual node.
TConstOrMutableMessage * pointer
Implementation of std::iterator_traits.
IteratorType(detail::ExceptionEntry *_p=nullptr)
bool operator==(IteratorType other) const
std::forward_iterator_tag iterator_category
Implementation of std::iterator_traits.
TConstOrMutableMessage * operator->() const
IteratorType operator++(int)
TConstOrMutableMessage & operator*() const
TConstOrMutableMessage & reference
Implementation of std::iterator_traits.
integer difference_type
Implementation of std::iterator_traits.
IteratorType & operator++()
Exception & operator=(Exception &) noexcept=default
ALIB_API Message & Back() const
ALIB_API int Size() const
ALIB_API const Enum & Type() const
Exception(TIntegral initialBufferSizeInKB, int bufferGrowthInPercent=100)
ALIB_API Message * allocMessageLink()
Exception & Add(const lang::CallerInfo &ci, TEnum type, TArgs &&... args)
Exception(Exception &) noexcept=default
Deleted copy constructor. Exceptions must be caught only as references.
ConstForwardIterator end() const
Exception(const lang::CallerInfo &ci, TEnum type, TArgs &&... args)
IteratorType< Message > ForwardIterator
The mutable iterator exposed by this container.
ALIB_API strings::TAString< complementChar, lang::HeapAllocator > & Format(strings::TAString< complementChar, lang::HeapAllocator > &target) const
ALIB_API void finalizeMessage(Message *message, bool hasRecord, ResourcePool *pool, const NString &category)
Exception & operator=(Exception &&) noexcept=default
ALIB_API AString & Format(AString &target) const
IteratorType< const Message > ConstForwardIterator
The constant iterator exposed by this container.
ConstForwardIterator begin() const
Exception(Exception &&src) noexcept=default
AllocatorType & GetAllocator() noexcept
void ConstructT(TArgs &&... args)
#define ALIB_ASSERT_MODULE(modulename)
#define ATMP_ISOF( T, TBase)
#define ALIB_BOXING_VTABLE_DECLARE(TMapped, Identifier)
#define ATMP_EQ( T, TEqual)
#define ATMP_SELECT_IF_1TP(TParam, ...)
platform_specific integer
ERSerializable() noexcept=default
Defaulted constructor leaving the record undefined.
String DescriptionOrItsResourceName
ERException() noexcept=default
Default constructor leaving the record undefined.
Message message
The message,.
ExceptionEntry * next
A pointer to the next message.
void operator()(TAString< TChar, TAllocator > &target, const lang::Exception &src)