19 #ifndef INCLUDE_RCF_EXCEPTION_HPP 20 #define INCLUDE_RCF_EXCEPTION_HPP 28 #include <RCF/Export.hpp> 29 #include <RCF/Config.hpp> 31 #include <RCF/ErrorMsg.hpp> 32 #include <RCF/MemStream.hpp> 40 RCF_EXPORT std::string osError(
int err);
44 #pragma warning(disable:4100) 45 #pragma warning(disable:4267) 49 std::string convertToString(T t)
60 RCF_EXPORT
bool shouldDisconnectOnRemoteError(
int errorId);
61 RCF_EXPORT
int getRuntimeVersionOfThisRemoteCall();
73 const std::string & arg1 =
"",
74 const std::string & arg2 =
"",
75 const std::string & arg3 =
"");
82 init(msg, convertToString(arg1),
"",
"");
85 template<
typename T1,
typename T2>
91 init(msg, convertToString(arg1), convertToString(arg2),
"");
94 template<
typename T1,
typename T2,
typename T3>
101 init(msg, convertToString(arg1), convertToString(arg2), convertToString(arg3));
106 const std::string & arg1 =
"",
107 const std::string & arg2 =
"",
108 const std::string & arg3 =
"");
114 virtual std::unique_ptr<Exception> clone()
const;
126 const char * what()
const throw();
129 int getErrorId()
const;
132 std::string getErrorMessage()
const;
134 bool getShouldRetry()
const;
135 void setShouldRetry(
bool shouldRetry);
137 virtual void throwSelf()
const;
140 std::string getErrorString()
const;
146 std::string mErrorString;
147 bool mShouldRetry =
false;
150 typedef std::shared_ptr<Exception> ExceptionPtr;
163 const std::string & arg1 =
"",
164 const std::string & arg2 =
"",
165 const std::string & arg3 =
"");
169 #if RCF_FEATURE_SF==1 175 #if RCF_FEATURE_BOOST_SERIALIZATION==1 176 template<
typename Archive>
177 void serialize(Archive &ar,
const unsigned int)
185 std::unique_ptr<Exception> clone()
const;
187 void throwSelf()
const;
190 std::string mRemoteExceptionType;
198 std::uint32_t runtimeVersion,
199 std::uint32_t archiveVersion);
209 std::unique_ptr<Exception> clone()
const;
210 void throwSelf()
const;
213 std::uint32_t mRuntimeVersion;
214 std::uint32_t mArchiveVersion;
219 #endif // ! INCLUDE_RCF_EXCEPTION_HPP Represents an archive, in which serialized objects are stored.
Definition: Archive.hpp:32
RCF_EXPORT std::uint32_t getArchiveVersion()
Gets the RCF archive version number.
Base class for all RCF exceptions.
Definition: Exception.hpp:64
Definition: ByteBuffer.hpp:189
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:153
Represents a versioning error raised by a server. Allows the server to specify runtime and archive ve...
Definition: Exception.hpp:194
Definition: AmiIoHandler.hpp:24
RCF_EXPORT bool init(RcfConfigT *=nullptr)
Reference-counted initialization of RCF library. May be called multiple times (see deinit())...