Hazelcast C++ Client
 All Classes Functions Variables Enumerations Pages
UnexpectedMessageTypeException.h
1 /*
2  * Copyright (c) 2008-2015, Hazelcast, Inc. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 //
17 // Created by ihsan demir on 10/11/15.
18 
19 #ifndef HAZELCAST_CLIENT_EXECEPTION_UNEXPECTEDMESSAGETYPEEXCEPTION_H_
20 #define HAZELCAST_CLIENT_EXECEPTION_UNEXPECTEDMESSAGETYPEEXCEPTION_H_
21 
22 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
23 #pragma warning(push)
24 #pragma warning(disable: 4251) //for dll export
25 #endif
26 
27 #include "hazelcast/client/exception/IException.h"
28 #include <string>
29 
30 namespace hazelcast {
31  namespace client {
32  namespace exception {
39  public:
43  UnexpectedMessageTypeException(const std::string &source, int actualType, int expectedType);
44 
48  virtual ~UnexpectedMessageTypeException() throw();
49 
53  virtual char const *what() const throw();
54  private:
55  int actual;
56  int expected;
57  std::string message;
58  };
59  }
60  }
61 }
62 
63 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
64 #pragma warning(pop)
65 #endif
66 
67 #endif //HAZELCAST_CLIENT_EXECEPTION_UNEXPECTEDMESSAGETYPEEXCEPTION_H_
68 
Base class for all exception originated from Hazelcast methods.
Definition: IException.h:50
If the type expected by the message decoder is different from the received message type...
Definition: UnexpectedMessageTypeException.h:38