diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2022-05-17 11:47:01 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2023-07-09 17:20:40 +0200 |
| commit | d13f6bb870cdda71257f665367be8ef9fca86255 (patch) | |
| tree | 52e214718478f1e52856572f5aa1a2ac58537f9f /src/shared/windows_error.h | |
| parent | 86bb01ba9eac879d3685c439ac9da0028bc4bc80 (diff) | |
Apply clang-format.
Diffstat (limited to 'src/shared/windows_error.h')
| -rw-r--r-- | src/shared/windows_error.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/shared/windows_error.h b/src/shared/windows_error.h index ea506dc1..2bdd6392 100644 --- a/src/shared/windows_error.h +++ b/src/shared/windows_error.h @@ -20,25 +20,28 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #ifndef WINDOWS_ERROR_H #define WINDOWS_ERROR_H - #include <stdexcept> #define WIN32_LEAN_AND_MEAN #include <windows.h> -namespace MOShared { +namespace MOShared +{ -class windows_error : public std::runtime_error { +class windows_error : public std::runtime_error +{ public: windows_error(const std::string& message, int errorcode = ::GetLastError()) - : runtime_error(constructMessage(message, errorcode)), m_ErrorCode(errorcode) + : runtime_error(constructMessage(message, errorcode)), m_ErrorCode(errorcode) {} int getErrorCode() const { return m_ErrorCode; } + private: std::string constructMessage(const std::string& input, int errorcode); + private: int m_ErrorCode; }; -} // namespace MOShared +} // namespace MOShared -#endif // WINDOWS_ERROR_H +#endif // WINDOWS_ERROR_H |
