18 #ifndef INCLUDE_RCF_EXCEPTION_HPP 19 #define INCLUDE_RCF_EXCEPTION_HPP 27 #include <RCF/Export.hpp> 28 #include <RCF/Config.hpp> 30 #include <RCF/ErrorMsg.hpp> 31 #include <RCF/MemStream.hpp> 39 RCF_EXPORT std::string osError(
int err);
43 #pragma warning(disable:4100) 44 #pragma warning(disable:4267) 48 std::string convertToString(
const std::u8string& t);
52 std::string convertToString(T t)
63 RCF_EXPORT
bool shouldDisconnectOnRemoteError(
int errorId);
64 RCF_EXPORT
int getRuntimeVersionOfThisRemoteCall();
76 const std::string & arg1 =
"",
77 const std::string & arg2 =
"",
78 const std::string & arg3 =
"");
85 init(msg, convertToString(arg1),
"",
"");
88 template<
typename T1,
typename T2>
94 init(msg, convertToString(arg1), convertToString(arg2),
"");
97 template<
typename T1,
typename T2,
typename T3>
104 init(msg, convertToString(arg1), convertToString(arg2), convertToString(arg3));
109 const std::string & arg1 =
"",
110 const std::string & arg2 =
"",
111 const std::string & arg3 =
"");
117 virtual std::unique_ptr<Exception> clone()
const;
129 const char * what()
const throw();
132 int getErrorId()
const;
135 std::string getErrorMessage()
const;
137 bool getShouldRetry()
const;
138 void setShouldRetry(
bool shouldRetry);
140 virtual void throwSelf()
const;
143 std::string getErrorString()
const;
149 std::string mErrorString;
150 bool mShouldRetry =
false;
153 typedef std::shared_ptr<Exception> ExceptionPtr;
166 const std::string & arg1 =
"",
167 const std::string & arg2 =
"",
168 const std::string & arg3 =
"");
172 #if RCF_FEATURE_SF==1 178 #if RCF_FEATURE_BOOST_SERIALIZATION==1 179 template<
typename Archive>
180 void serialize(Archive &ar,
const unsigned int)
188 std::unique_ptr<Exception> clone()
const;
190 void throwSelf()
const;
193 std::string mRemoteExceptionType;
201 std::uint32_t runtimeVersion,
202 std::uint32_t archiveVersion);
212 std::unique_ptr<Exception> clone()
const;
213 void throwSelf()
const;
216 std::uint32_t mRuntimeVersion;
217 std::uint32_t mArchiveVersion;
222 #endif // ! INCLUDE_RCF_EXCEPTION_HPP Represents an archive, in which serialized objects are stored.
Definition: Archive.hpp:31
RCF_EXPORT std::uint32_t getArchiveVersion()
Gets the RCF archive version number.
Base class for all RCF exceptions.
Definition: Exception.hpp:67
Definition: ByteBuffer.hpp:188
RCF_EXPORT std::uint32_t getRuntimeVersion()
Gets the RCF runtime version number.
Represents an error that occurs on a RCF server and is transmitted back to the client.
Definition: Exception.hpp:156
Represents a versioning error raised by a server. Allows the server to specify runtime and archive ve...
Definition: Exception.hpp:197
Definition: AmiIoHandler.hpp:23
RCF_EXPORT bool init(RcfConfigT *=nullptr)
Reference-counted initialization of RCF library. May be called multiple times (see deinit())...