[
https://issues.apache.org/jira/browse/GEODE-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16245193#comment-16245193
]
ASF GitHub Bot commented on GEODE-3136:
---------------------------------------
pivotal-jbarrett commented on a change in pull request #144: GEODE-3136:
Convert time values to std::chrono::duration.
URL: https://github.com/apache/geode-native/pull/144#discussion_r149865272
##########
File path: cppcache/include/geode/ExceptionTypes.hpp
##########
@@ -31,30 +31,27 @@ namespace apache {
namespace geode {
namespace client {
-#define _GF_EXCEPTION_DEF(x) \
- const char _exception_name_##x[] = "apache::geode::client::" #x; \
- class x; \
- typedef std::shared_ptr<x> x##Ptr; \
- class CPPCACHE_EXPORT x : public apache::geode::client::Exception { \
- public: \
- x(const char* msg1, const char* msg2 = nullptr, bool forceStack = false, \
- const ExceptionPtr& cause = nullptr) \
- : Exception(msg1, msg2, forceStack, cause) {} \
- x(const x& other) : Exception(other) {} \
- virtual Exception* clone() const { \
- return new x(m_message, m_stack, m_cause); \
- } \
- virtual ~x() {} \
- virtual const char* getName() const { return _exception_name_##x; } \
- virtual void raise() { throw * this; } \
- \
- protected: \
- x(const CacheableStringPtr& message, const StackTracePtr& stack, \
- const ExceptionPtr& cause) \
- : Exception(message, stack, cause) {} \
- \
- private: \
- const x& operator=(const x&); \
+#define _GF_EXCEPTION_DEF(x) \
+ const char _exception_name_##x[] = "apache::geode::client::" #x; \
+ class x; \
+ typedef std::shared_ptr<x> x##Ptr; \
+ class CPPCACHE_EXPORT x : public apache::geode::client::Exception { \
+ public: \
+ using Exception::Exception; \
+ virtual Exception* clone() const { \
+ return new x(m_message, m_stack, m_cause); \
+ } \
+ virtual ~x() {} \
+ virtual const char* getName() const { return _exception_name_##x; } \
+ virtual void raise() { throw * this; } \
+ \
+ protected: \
+ x(const CacheableStringPtr& message, const StackTracePtr& stack, \
+ const ExceptionPtr& cause) \
+ : Exception(message, stack, cause) {} \
+ \
+ private: \
+ const x& operator=(const x&); \
Review comment:
Yes, this particular line could be replaced with a delete attribute, though
this is not the change I made to the file. The changes I made were at line 40
to use C++11's constructor inheritance. This was in conjunction with the
changes to the base class Exception to take std::string and noexcept on the
copy constructor as required for exceptions.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Replace all public API time values with std::chrono types
> ---------------------------------------------------------
>
> Key: GEODE-3136
> URL: https://issues.apache.org/jira/browse/GEODE-3136
> Project: Geode
> Issue Type: Improvement
> Components: native client
> Reporter: Jacob S. Barrett
> Assignee: Jacob S. Barrett
>
> Remove ambiguity of time values by using
> [{{std::chrono}}|http://en.cppreference.com/w/cpp/chrono] types in the public
> API.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)