From 030b21379b2f03e41e710f1a4882c06cd0ef6309 Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Mon, 4 Jun 2018 14:08:24 +0200 Subject: [PATCH] Move exception to header Otherwise, it obviously can't be caught by users of the ElfFile class. --- include/linuxdeploy/core/elf.h | 6 ++++++ src/core/elf.cpp | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linuxdeploy/core/elf.h b/include/linuxdeploy/core/elf.h index d582ce6..709faa1 100644 --- a/include/linuxdeploy/core/elf.h +++ b/include/linuxdeploy/core/elf.h @@ -10,6 +10,12 @@ namespace linuxdeploy { namespace core { namespace elf { + // thrown by constructor if file is not an ELF file + class ElfFileParseError : public std::runtime_error { + public: + explicit ElfFileParseError(const std::string& msg) : std::runtime_error(msg) {} + }; + class ElfFile { private: class PrivateData; diff --git a/src/core/elf.cpp b/src/core/elf.cpp index 466d4df..a36f851 100644 --- a/src/core/elf.cpp +++ b/src/core/elf.cpp @@ -17,12 +17,6 @@ namespace bf = boost::filesystem; namespace linuxdeploy { namespace core { namespace elf { - // thrown by constructor if file is not an ELF file - class ElfFileParseError : public std::runtime_error { - public: - explicit ElfFileParseError(const std::string& msg) : std::runtime_error(msg) {} - }; - class ElfFile::PrivateData { public: const bf::path path;