From d801ff36f6c92484707adf07f396ad5f788e252c Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 9 Oct 2017 17:53:28 +0200 Subject: [PATCH] [resource_compiler] Make the exception public. This is useless to raise an exception if the exception in not published in the header. --- scripts/kiwix-compile-resources | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/kiwix-compile-resources b/scripts/kiwix-compile-resources index 65262ffa..e4993ba6 100755 --- a/scripts/kiwix-compile-resources +++ b/scripts/kiwix-compile-resources @@ -106,16 +106,8 @@ master_c_template = """//This file is automaically generated. Do not modify it. #include #include -#include #include "{include_file}" -class ResourceNotFound : public std::runtime_error {{ - public: - ResourceNotFound(const std::string& what_arg): - std::runtime_error(what_arg) - {{ }}; -}}; - static std::string init_resource(const char* name, const unsigned char* content, int len) {{ char * resPath = getenv(name); @@ -153,11 +145,19 @@ master_h_template = """//This file is automaically generated. Do not modify it. #define KIWIX_{BASENAME} #include +#include namespace RESOURCE {{ {RESOURCES} }}; +class ResourceNotFound : public std::runtime_error {{ + public: + ResourceNotFound(const std::string& what_arg): + std::runtime_error(what_arg) + {{ }}; +}}; + const std::string& getResource_{basename}(const std::string& name); #define getResource(a) (getResource_{basename}(a))