DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Loading...
Searching...
No Matches
Exception.h
Go to the documentation of this file.
1
5
6#pragma once
7#include "Common.h"
8#include <stdexcept>
9
10namespace DotNetDupe {
11 namespace System {
12 class String;
13
19 class Exception : public std::runtime_error {
20 private:
21 Exception* m_pInnerException = nullptr;
22 public:
25
28 DOTNETDUPE_API Exception(const String& sMessage);
29
33 DOTNETDUPE_API Exception(const String& sMessage, const Exception& innerException);
34
37
40
42 DOTNETDUPE_API virtual ~Exception();
43
46 const char* What() const { return what(); }
47 };
48 }
49}
Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition Common.h:20
Exception & operator=(const Exception &other)
Copy assignment operator.
Definition Exception.cpp:33
const char * What() const
Gets a message that describes the current exception.
Definition Exception.h:46
Exception()
Initializes a new instance of the Exception class with a default system-supplied message.
Definition Exception.cpp:15
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Definition String.h:74