PLCnext API Documentation 23.6.0.37
StackOverflowException.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include "Arp/System/Commons/Exceptions/Plc/PlcException.hpp"
9
10namespace Arp { namespace System { namespace Commons { namespace Plc
11{
12
15{
16public: // construction/destruction
17 template<typename... Args>
18 StackOverflowException(const char* message, const Args& ... args);
19 StackOverflowException(const String& message);
21 StackOverflowException(const String& message, int skipStackTraceDepth);
22 StackOverflowException(String&& message, int skipStackTraceDepth);
23 StackOverflowException(const String& message, const Exception& innerException);
24 StackOverflowException(String&& message, Exception&& innerException);
27 virtual ~StackOverflowException(void) = default;
28
29public: // static factory methods
30 static StackOverflowException Create(const String& message);
31 static StackOverflowException CreateWithStackTrace(const String& message, const String& additionalStackTrace, int skipStackTraceDepth = 0);
32
33protected: // overridden operations
34 Exception::Ptr Clone(void)const override;
35
36private: // deleted methods
37 StackOverflowException& operator=(const StackOverflowException& arg) = delete;
38};
39
41// inline methods of class StackOverflowException
42
44template<typename... Args>
45inline StackOverflowException::StackOverflowException(const char* message, const Args& ... args)
46 : PlcException(ExceptionTypeId::PlcStackOverflow, String::Format(message, args...))
47{
48}
49
52 : PlcException(ExceptionTypeId::PlcStackOverflow, message)
53{
54}
55
58 : PlcException(ExceptionTypeId::PlcStackOverflow, std::move(message))
59{
60}
61
63inline StackOverflowException::StackOverflowException(const String& message, int skipStackTraceDepth)
64 : PlcException(ExceptionTypeId::PlcStackOverflow, message, skipStackTraceDepth)
65{
66}
67
69inline StackOverflowException::StackOverflowException(String&& message, int skipStackTraceDepth)
70 : PlcException(ExceptionTypeId::PlcStackOverflow, std::move(message), skipStackTraceDepth)
71{
72}
73
75inline StackOverflowException::StackOverflowException(const String& message, const Exception& innerException)
76 : PlcException(ExceptionTypeId::PlcStackOverflow, message, innerException)
77{
78}
79
82 : PlcException(ExceptionTypeId::PlcStackOverflow, std::move(message), std::move(innerException))
83{
84}
85
86}}}} // end of namesapce Arp::System::Commons::Plc
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 exception is used when a $$$TODO$$$ occurs.
Definition: PlcException.hpp:15
This exception is used when a $$$TODO$$$ occurs.
Definition: StackOverflowException.hpp:15
Exception::Ptr Clone(void) const override
Clones this instance.
StackOverflowException(const char *message, const Args &... args)
Constructs an StackOverflowException instance.
Definition: StackOverflowException.hpp:45
@ 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