VMware Tanzu GemFire Native C++ Reference  10.1.5
UserFunctionExecutionException.hpp
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #pragma once
19 
20 #ifndef GEODE_USERFUNCTIONEXECUTIONEXCEPTION_H_
21 #define GEODE_USERFUNCTIONEXECUTIONEXCEPTION_H_
22 
23 #include <memory>
24 #include <string>
25 
26 #include "CacheableString.hpp"
27 #include "Serializable.hpp"
28 
29 namespace apache {
30 namespace geode {
31 namespace client {
32 
33 class UserFunctionExecutionException;
34 class DataInput;
35 class DataOutput;
36 
41 class APACHE_GEODE_EXPORT UserFunctionExecutionException : public Serializable {
42  public:
43  explicit UserFunctionExecutionException(std::string message)
44  : m_message(std::move(message)) {}
46  delete;
47  void operator=(const UserFunctionExecutionException& other) = delete;
48 
49  ~UserFunctionExecutionException() override = default;
50 
55  const std::string& getMessage() const { return m_message; }
56 
57  std::string toString() const override { return this->getMessage(); }
58 
63  const std::string& getName() const {
64  static const std::string name = "UserFunctionExecutionException";
65  return name;
66  }
67 
68  private:
69  std::string m_message;
70 };
71 
72 } // namespace client
73 } // namespace geode
74 } // namespace apache
75 
76 #endif // GEODE_USERFUNCTIONEXECUTIONEXCEPTION_H_
CacheableString.hpp
apache::geode::client::UserFunctionExecutionException::toString
std::string toString() const override
Display this object as 'string', which depends on the implementation in the subclasses.
Definition: UserFunctionExecutionException.hpp:57
apache::geode::client::UserFunctionExecutionException
UserFunctionExecutionException class is used to encapsulate geode sendException in case of Function e...
Definition: UserFunctionExecutionException.hpp:41
apache::geode::client::Serializable
This base class is the superclass of all user objects in the cache that can be serialized.
Definition: Serializable.hpp:53
apache::geode::client::UserFunctionExecutionException::getName
const std::string & getName() const
return as std::string the Exception name returned from geode sendException api.
Definition: UserFunctionExecutionException.hpp:63
apache::geode::client::UserFunctionExecutionException::getMessage
const std::string & getMessage() const
return as std::string the Exception message returned from geode sendException api.
Definition: UserFunctionExecutionException.hpp:55

Apache Geode C++ Cache API Documentation