19 #ifndef HAZELCAST_CLIENT_EXCEPTION_PROTOCOLEXCEPTIONS_H_ 
   20 #define HAZELCAST_CLIENT_EXCEPTION_PROTOCOLEXCEPTIONS_H_ 
   24 #include "hazelcast/client/exception/IException.h" 
   26 #if  defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) 
   28 #pragma warning(disable: 4251) //for dll export 
   36                 ProtocolException(
const std::string& source, 
const std::string& message, int32_t errorNo, int32_t causeCode)
 
   37                         : 
IException(source, message), errorCode(errorNo), causeErrorCode(causeCode) {
 
   41                         : 
IException(source, message), errorCode(-1), causeErrorCode(-1) {
 
   44                 int32_t getErrorCode()
 const {
 
   48                 int32_t getCauseErrorCode()
 const {
 
   49                     return causeErrorCode;
 
   53                 int32_t causeErrorCode;
 
   56 #define DEFINE_PROTOCOL_EXCEPTION(ClassName) \ 
   57             class HAZELCAST_API ClassName : public ProtocolException {\ 
   59                 ClassName(const std::string& source, const std::string& message, int32_t errorCode, int32_t causeCode) \ 
   60                     : ProtocolException(source, message, errorCode, causeCode) {\ 
   62                 ClassName(const std::string& source, const std::string& message) \ 
   63                     : ProtocolException(source, message) {\ 
   65                 ClassName(const std::string& source) : ProtocolException(source, "") {\ 
   67                 virtual void raise() {\ 
   72             DEFINE_PROTOCOL_EXCEPTION(ArrayIndexOutOfBoundsException);
 
   73             DEFINE_PROTOCOL_EXCEPTION(ArrayStoreException);
 
   74             DEFINE_PROTOCOL_EXCEPTION(AuthenticationException);
 
   75             DEFINE_PROTOCOL_EXCEPTION(CacheNotExistsException);
 
   76             DEFINE_PROTOCOL_EXCEPTION(CallerNotMemberException);
 
   77             DEFINE_PROTOCOL_EXCEPTION(CancellationException);
 
   78             DEFINE_PROTOCOL_EXCEPTION(ClassCastException);
 
   79             DEFINE_PROTOCOL_EXCEPTION(ClassNotFoundException);
 
   80             DEFINE_PROTOCOL_EXCEPTION(ConcurrentModificationException);
 
   81             DEFINE_PROTOCOL_EXCEPTION(ConfigMismatchException);
 
   82             DEFINE_PROTOCOL_EXCEPTION(ConfigurationException);
 
   83             DEFINE_PROTOCOL_EXCEPTION(DistributedObjectDestroyedException);
 
   84             DEFINE_PROTOCOL_EXCEPTION(DuplicateInstanceNameException);
 
   85             DEFINE_PROTOCOL_EXCEPTION(EOFException);
 
   86             DEFINE_PROTOCOL_EXCEPTION(ExecutionException);
 
   87             DEFINE_PROTOCOL_EXCEPTION(HazelcastException);
 
   88             DEFINE_PROTOCOL_EXCEPTION(HazelcastInstanceNotActiveException);
 
   89             DEFINE_PROTOCOL_EXCEPTION(HazelcastOverloadException);
 
   90             DEFINE_PROTOCOL_EXCEPTION(HazelcastSerializationException);
 
   91             DEFINE_PROTOCOL_EXCEPTION(IOException);
 
   92             DEFINE_PROTOCOL_EXCEPTION(IllegalArgumentException);
 
   93             DEFINE_PROTOCOL_EXCEPTION(IllegalAccessException);
 
   94             DEFINE_PROTOCOL_EXCEPTION(IllegalAccessError);
 
   95             DEFINE_PROTOCOL_EXCEPTION(IllegalMonitorStateException);
 
   96             DEFINE_PROTOCOL_EXCEPTION(IllegalStateException);
 
   97             DEFINE_PROTOCOL_EXCEPTION(IllegalThreadStateException);
 
   98             DEFINE_PROTOCOL_EXCEPTION(IndexOutOfBoundsException);
 
   99             DEFINE_PROTOCOL_EXCEPTION(InterruptedException);
 
  100             DEFINE_PROTOCOL_EXCEPTION(InvalidAddressException);
 
  101             DEFINE_PROTOCOL_EXCEPTION(InvalidConfigurationException);
 
  102             DEFINE_PROTOCOL_EXCEPTION(MemberLeftException);
 
  103             DEFINE_PROTOCOL_EXCEPTION(NegativeArraySizeException);
 
  104             DEFINE_PROTOCOL_EXCEPTION(NoSuchElementException);
 
  105             DEFINE_PROTOCOL_EXCEPTION(NotSerializableException);
 
  106             DEFINE_PROTOCOL_EXCEPTION(NullPointerException);
 
  107             DEFINE_PROTOCOL_EXCEPTION(OperationTimeoutException);
 
  108             DEFINE_PROTOCOL_EXCEPTION(PartitionMigratingException);
 
  109             DEFINE_PROTOCOL_EXCEPTION(QueryException);
 
  110             DEFINE_PROTOCOL_EXCEPTION(QueryResultSizeExceededException);
 
  111             DEFINE_PROTOCOL_EXCEPTION(QuorumException);
 
  112             DEFINE_PROTOCOL_EXCEPTION(ReachedMaxSizeException);
 
  113             DEFINE_PROTOCOL_EXCEPTION(RejectedExecutionException);
 
  114             DEFINE_PROTOCOL_EXCEPTION(RemoteMapReduceException);
 
  115             DEFINE_PROTOCOL_EXCEPTION(ResponseAlreadySentException);
 
  116             DEFINE_PROTOCOL_EXCEPTION(RetryableHazelcastException);
 
  117             DEFINE_PROTOCOL_EXCEPTION(RetryableIOException);
 
  118             DEFINE_PROTOCOL_EXCEPTION(RuntimeException);
 
  119             DEFINE_PROTOCOL_EXCEPTION(SecurityException);
 
  120             DEFINE_PROTOCOL_EXCEPTION(SocketException);
 
  124             DEFINE_PROTOCOL_EXCEPTION(StaleSequenceException);
 
  125             DEFINE_PROTOCOL_EXCEPTION(TargetDisconnectedException);
 
  126             DEFINE_PROTOCOL_EXCEPTION(TargetNotMemberException);
 
  127             DEFINE_PROTOCOL_EXCEPTION(TimeoutException);
 
  128             DEFINE_PROTOCOL_EXCEPTION(TopicOverloadException);
 
  129             DEFINE_PROTOCOL_EXCEPTION(TopologyChangedException);
 
  130             DEFINE_PROTOCOL_EXCEPTION(TransactionException);
 
  131             DEFINE_PROTOCOL_EXCEPTION(TransactionNotActiveException);
 
  132             DEFINE_PROTOCOL_EXCEPTION(TransactionTimedOutException);
 
  133             DEFINE_PROTOCOL_EXCEPTION(URISyntaxException);
 
  134             DEFINE_PROTOCOL_EXCEPTION(UTFDataFormatException);
 
  135             DEFINE_PROTOCOL_EXCEPTION(UnsupportedOperationException);
 
  136             DEFINE_PROTOCOL_EXCEPTION(WrongTargetException);
 
  137             DEFINE_PROTOCOL_EXCEPTION(XAException);
 
  138             DEFINE_PROTOCOL_EXCEPTION(AccessControlException);
 
  139             DEFINE_PROTOCOL_EXCEPTION(LoginException);
 
  140             DEFINE_PROTOCOL_EXCEPTION(UnsupportedCallbackException);
 
  141             DEFINE_PROTOCOL_EXCEPTION(NoDataMemberInClusterException);
 
  142             DEFINE_PROTOCOL_EXCEPTION(ReplicatedMapCantBeCreatedOnLiteMemberException);
 
  143             DEFINE_PROTOCOL_EXCEPTION(MaxMessageSizeExceeded);
 
  144             DEFINE_PROTOCOL_EXCEPTION(WANReplicationQueueFullException);
 
  145             DEFINE_PROTOCOL_EXCEPTION(AssertionError);
 
  146             DEFINE_PROTOCOL_EXCEPTION(OutOfMemoryError);
 
  147             DEFINE_PROTOCOL_EXCEPTION(StackOverflowError);
 
  148             DEFINE_PROTOCOL_EXCEPTION(NativeOutOfMemoryError);
 
  149             DEFINE_PROTOCOL_EXCEPTION(ServiceNotFoundException);
 
  154                 : error(errorCode), messageCallId(correlationId), detailedErrorMessage(details) {
 
  160                 int32_t getErrorCode()
 const {
 
  164                 int64_t getMessageCallId()
 const {
 
  165                     return messageCallId;
 
  168                 const std::string &getDetailedErrorMessage()
 const {
 
  169                     return detailedErrorMessage;
 
  174                 int64_t messageCallId;
 
  175                 std::string detailedErrorMessage;
 
  181 #if  defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) 
  185 #endif //HAZELCAST_CLIENT_EXCEPTION_PROTOCOLEXCEPTIONS_H_ 
Base class for all exception originated from Hazelcast methods. 
Definition: IException.h:49
 
Definition: ProtocolExceptions.h:34
 
Definition: ProtocolExceptions.h:151