1 #ifndef CBE__util__ErrorInfo_h__
2 #define CBE__util__ErrorInfo_h__
13 std::string contextStr{};
15 virtual void printError(std::ostream& os)
const = 0;
17 explicit operator bool ()
const;
23 std::ostream& operator<<(std::ostream& os,
const ErrorInfo& ei);
26 template <
class ErrorT>
31 template <
class ErrorT2>
38 void printError(std::ostream& os)
const final;
41 template <
class ErrorT>
43 :
ErrorInfo{std::move(context)}, error{std::move(error)} {}
45 template <
class ErrorT>
46 ErrorInfoImpl<ErrorT>::ErrorInfoImpl() =
default;
48 template <
class ErrorT>
49 template <
class ErrorT2>
50 ErrorInfoImpl<ErrorT>&
51 ErrorInfoImpl<ErrorT>::operator=(ErrorInfoImpl<ErrorT2>&& rh) {
52 ErrorInfo::operator=(std::move(rh));
53 error = std::move(rh.error);
57 template <
class ErrorT>
58 void ErrorInfoImpl<ErrorT>::printError(std::ostream& os)
const {
Root namespace for the CloudBackend SDK API.
Definition: Account.h:22
Definition: ErrorInfo.h:27
Definition: ErrorInfo.h:12