7#ifndef ARP_USE_ARP_SYSTEM_COMMONS_EXCEPTIONS
8#include "Arp/Base/Commons/Exceptions/ArgumentNullException.hpp"
15#include "Arp/System/Commons/Exceptions/ArgumentException.hpp"
18namespace Arp {
namespace System {
namespace Commons
22class ArgumentNullException :
public ArgumentException
25 template<
typename... Args>
26 ArgumentNullException(
const char* message,
const Args& ... args);
27 ArgumentNullException(
const String& message);
28 ArgumentNullException(String&& message);
29 ArgumentNullException(
const String& message,
const Exception& innerException);
30 ArgumentNullException(String&& message, Exception&& innerException);
31 ArgumentNullException(
const ArgumentNullException& arg) =
default;
32 ArgumentNullException(ArgumentNullException&& arg) =
default;
33 virtual ~ArgumentNullException(
void) =
default;
36 static ArgumentNullException
Create(
const char* paramName);
37 static ArgumentNullException
Create(
const char* paramName,
const Exception& innerException);
43 ArgumentNullException& operator=(
const ArgumentNullException& arg) =
delete;
46 static const char*
const defaultMessage;
53template<
typename... Args>
55 : ArgumentException(
ExceptionTypeId::ArgumentNull, String::Format(message, args...))
60inline ArgumentNullException::ArgumentNullException(
const String& message)
61 : ArgumentException(ExceptionTypeId::ArgumentNull, message)
66inline ArgumentNullException::ArgumentNullException(String&& message)
67 : ArgumentException(ExceptionTypeId::ArgumentNull,
std::move(message))
72inline ArgumentNullException::ArgumentNullException(
const String& message,
const Exception& innerException)
73 : ArgumentException(ExceptionTypeId::ArgumentNull, message, innerException)
78inline ArgumentNullException::ArgumentNullException(String&& message, Exception&& innerException)
79 : ArgumentException(ExceptionTypeId::ArgumentNull,
std::move(message),
std::move(innerException))
84inline ArgumentNullException ArgumentNullException::Create(
const char* paramName)
86 return ArgumentNullException(defaultMessage, paramName);
90inline ArgumentNullException ArgumentNullException::Create(
const char* paramName,
const Exception& innerException)
92 return ArgumentNullException(String::Format(defaultMessage, paramName), innerException);
99template<>
struct fmt::formatter<
Arp::System::Commons::ArgumentNullException> :
public fmt::ostream_formatter {};
This exception is thrown when an invalid null argument occurs.
Definition: ArgumentNullException.hpp:16
ArgumentNullException(const ArgumentNullException &arg)
Default copy constructor.
std::unique_ptr< Exception > Ptr
The smart pointer type of this class.
Definition: Exception.hpp:27
@ Create
Creates a new file. If the file already exists, it is overwritten.
ExceptionTypeId
Specifies the type id of any exception derived by <see cref="CommonException".
Definition: ExceptionTypeId.hpp:15
Root namespace for the PLCnext API
Namespace of the C++ standard library