Cscott has uploaded a new change for review. 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(-) git pull ssh://gerrit.wikimedia.org:29418/openzim refs/changes/20/295720/1 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: newchange Gerrit-Change-Id: Ib49060c7fe479054e58c20249dd9b3236ea7eb03 Gerrit-PatchSet: 1 Gerrit-Project: openzim Gerrit-Branch: master Gerrit-Owner: Cscott <canan...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits