Removed CDS_DECLARE_EXCEPTION macro
[libcds.git] / cds / gc / details / dhp.h
index 7c918baeebf84760d69deebe9af6bd3d8c60e554..3f30422d35858bd08fb7806abc6bce5433888ea3 100644 (file)
@@ -671,7 +671,15 @@ namespace cds { namespace gc {
 
         public:
             /// Exception "No GarbageCollector object is created"
-            CDS_DECLARE_EXCEPTION( DHPManagerEmpty, "Global DHP GarbageCollector is NULL" );
+            class not_initialized : public std::runtime_error
+            {
+            public:
+                //@cond
+                not_initialized()
+                    : std::runtime_error( "Global DHP GarbageCollector is not initialized" )
+                {}
+                //@endcond
+            };
 
             /// Internal GC statistics
             struct InternalState
@@ -739,12 +747,12 @@ namespace cds { namespace gc {
 
             /// Returns pointer to GarbageCollector instance
             /**
-                If DHP GC is not initialized, \p DHPManagerEmpty exception is thrown
+                If DHP GC is not initialized, \p not_initialized exception is thrown
             */
             static GarbageCollector&   instance()
             {
                 if ( m_pManager == nullptr )
-                    throw DHPManagerEmpty();
+                    throw not_initialized();
                 return *m_pManager;
             }