9#include "Arp/Base/Core/ExceptionTypeId.hpp"
12namespace Arp {
namespace Base {
namespace Core
27 using Ptr = std::unique_ptr<Exception>;
29 using TypeCode = std::underlying_type<Arp::Base::Core::ExceptionTypeId>::type;
40 template<
typename... Args>
41 Exception(
const char* message, Args&& ... args);
54 const String& GetMessage(
void)
const;
55 ExceptionTypeId GetTypeId(
void)
const;
57 bool HasInnerException(
void)
const;
58 const Exception& GetInnerException(
void)
const;
61 String ToString(
void)
const;
65 virtual String Format(
bool withInnerException)
const;
68 friend ARP_EXPORT std::ostream& operator<<(std::ostream& os,
const Exception& arg);
71 ARP_DEPRECATED(
"Use the protected constructor 'Exception(ExceptionTypeId, String&&, const Exception&)' instead.")
75 String Format(
int indentLevel,
bool withInnerException)const;
77 ARP_DEPRECATED("Remove the override of this operation, it's not required any more.")
78 virtual
uint32 GetTypeCodeInternal(
void)const;
82 const Impl& GetImpl(
void)const;
93ARP_EXPORT
std::ostream& operator<<(
std::ostream& os, const
Exception& arg);
101template<typename... Args>
114template<>
struct fmt::formatter<
Arp::Base::Core::Exception> :
public fmt::ostream_formatter {};
This is the base class of all Arp exception classes.
Definition: Exception.hpp:21
Exception(Exception &&arg) noexcept
Default move constructor.
std::unique_ptr< Exception > Ptr
The smart pointer type of this class.
Definition: Exception.hpp:27
Exception(const Exception &arg)
Default copy constructor.
virtual ~Exception(void)
Default destructor.
Exception & operator=(Exception &&arg) noexcept
Default move-assignment operator.
std::underlying_type< Arp::Base::Core::ExceptionTypeId >::type TypeCode
The integral type of the type code.
Definition: Exception.hpp:29
Exception & operator=(const Exception &arg)
Default copy-assignment operator.
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
std::uint32_t uint32
The Arp unsigned integer type of 4 byte size.
Definition: PrimitiveTypes.hpp:33
Root namespace for the PLCnext API
class ARP_DEPRECATED("Use Arp::Enum<T> instead.") EnumStrings
Deprecated! The class implements an adapter for enums to define the string literals of the enum entri...
Definition: EnumStrings.hxx:38
Namespace of the C++ standard library