Kelson has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/295720 )

Change subject: Move `throw` statement out of header file.
......................................................................


Move `throw` statement out of header file.

This ensures that we don't fail compilation when including the header
file in an environment where exception handling is disabled (like
when binding to node.js).

Change-Id: Ib49060c7fe479054e58c20249dd9b3236ea7eb03
---
M zimlib/include/zim/writer/articlesource.h
M zimlib/src/articlesource.cpp
2 files changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Kelson: Verified; Looks good to me, approved



diff --git a/zimlib/include/zim/writer/articlesource.h 
b/zimlib/include/zim/writer/articlesource.h
index 94ee91b..54653ef 100644
--- a/zimlib/include/zim/writer/articlesource.h
+++ b/zimlib/include/zim/writer/articlesource.h
@@ -97,7 +97,8 @@
          * code to not use it.
          * This should be removed once every users switch to new API.
          */
-        virtual Blob getData(const std::string& aid) { throw "This should not 
be called"; };
+        virtual Blob getData(const std::string& aid);
+
         
/**********************************************************************/
     };
 
diff --git a/zimlib/src/articlesource.cpp b/zimlib/src/articlesource.cpp
index cc72ae2..a2087a7 100644
--- a/zimlib/src/articlesource.cpp
+++ b/zimlib/src/articlesource.cpp
@@ -80,6 +80,9 @@
       std::cerr << "                     You should override Article::getData 
directly." << std::endl;
       return __source->getData(getAid());
     }
+    Blob ArticleSource::getData(const std::string& aid) {
+        throw std::runtime_error("This should not be called");
+    }
     
/**************************************************************************/
 
     Uuid ArticleSource::getUuid()

-- 
To view, visit https://gerrit.wikimedia.org/r/295720
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib49060c7fe479054e58c20249dd9b3236ea7eb03
Gerrit-PatchSet: 1
Gerrit-Project: openzim
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian <canan...@wikimedia.org>
Gerrit-Reviewer: Kelson <kel...@kiwix.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to