PLCnext API Documentation 23.0.2.9
EndOfStreamException.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include "Arp/System/Commons/Exceptions/CommonException.hpp"
9
10namespace Arp { namespace System { namespace Commons { namespace Io
11{
12
15{
16public: // construction/destruction
17 template<typename... Args>
18 EndOfStreamException(const char* message, const Args& ... args);
19 EndOfStreamException(const String& message);
21 EndOfStreamException(const String& message, const Exception& innerException);
22 EndOfStreamException(String&& message, Exception&& innerException);
23 EndOfStreamException(const EndOfStreamException& arg) = default;
25 virtual ~EndOfStreamException(void) = default;
26
27protected: // overridden operations
28 Exception::Ptr Clone(void)const override;
29
30private: // deleted methods
31 EndOfStreamException& operator=(const EndOfStreamException& arg) = delete;
32};
33
35// inline methods of class EndOfStreamException
36
38template<typename... Args>
39inline EndOfStreamException::EndOfStreamException(const char* message, const Args& ... args)
40 : CommonException(ExceptionTypeId::IoEndOfStream, String::Format(message, args...))
41{
42}
43
46 : CommonException(ExceptionTypeId::IoEndOfStream, message)
47{
48}
49
52 : CommonException(ExceptionTypeId::IoEndOfStream, std::move(message))
53{
54}
55
57inline EndOfStreamException::EndOfStreamException(const String& message, const Exception& innerException)
58 : CommonException(ExceptionTypeId::IoEndOfStream, message, innerException)
59{
60}
61
64 : CommonException(ExceptionTypeId::IoEndOfStream, std::move(message), std::move(innerException))
65{
66}
67
68}}}} // end of namesapce Arp::System::Commons::Io
This is the base class of all Arp exception classes.
Definition: Exception.hpp:16
std::shared_ptr< Exception > Ptr
The smart pointer tpye of this class.
Definition: Exception.hpp:19
This is the base class of common exception classes.
Definition: CommonException.hpp:19
This is the base class of all IO exceptions.
Definition: EndOfStreamException.hpp:15
Exception::Ptr Clone(void) const override
Clones this instance.
EndOfStreamException(const char *message, const Args &... args)
Constructs an EndOfStreamException instance.
Definition: EndOfStreamException.hpp:39
@ System
System components used by the System, Device, Plc or Io domains.
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