AdsLib
Loading...
Searching...
No Matches
AdsException.h
1// SPDX-License-Identifier: MIT
6#pragma once
7
8#include <stdexcept>
9#include <string>
10
11struct AdsException : std::exception {
12 AdsException(const long adsErrorCode) :
13 errorCode(adsErrorCode),
14 m_Message("Ads operation failed with error code " + std::to_string(adsErrorCode) + ".")
15 {}
16
17 virtual ~AdsException() throw (){}
18
19 virtual const char* what() const throw ()
20 {
21 return m_Message.c_str();
22 }
23
24 const long errorCode;
25protected:
26 const std::string m_Message;
27};
Definition: AdsException.h:11