diff --git a/include/linuxdeploy/plugin/base_impl.h b/include/linuxdeploy/plugin/base_impl.h index 2f74f87..ee964c2 100644 --- a/include/linuxdeploy/plugin/base_impl.h +++ b/include/linuxdeploy/plugin/base_impl.h @@ -28,7 +28,7 @@ namespace linuxdeploy { public: explicit PrivateData(const boost::filesystem::path& path) : pluginPath(path) { if (!boost::filesystem::exists(path)) { - throw std::runtime_error("No such file or directory: " + path.string()); + throw PluginError("No such file or directory: " + path.string()); } apiLevel = getApiLevelFromExecutable(); diff --git a/include/linuxdeploy/plugin/plugin.h b/include/linuxdeploy/plugin/plugin.h index 2844ca2..96c0745 100644 --- a/include/linuxdeploy/plugin/plugin.h +++ b/include/linuxdeploy/plugin/plugin.h @@ -19,9 +19,17 @@ namespace linuxdeploy { /* * Exception class indicating that the plugin doesn't implement the right API level for the selected class */ - class WrongApiLevelError : public std::runtime_error { + class PluginError : public std::runtime_error { public: - explicit WrongApiLevelError(const std::string& msg) : std::runtime_error(msg) {} + explicit PluginError(const std::string& msg) : std::runtime_error(msg) {} + }; + + /* + * Exception class indicating that the plugin doesn't implement the right API level for the selected class + */ + class WrongApiLevelError : public PluginError { + public: + explicit WrongApiLevelError(const std::string& msg) : PluginError(msg) {} }; enum PLUGIN_TYPE {