]> source.dussan.org Git - redmine.git/commitdiff
Merged r17960 to 4.0-stable (#31030).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 15 Mar 2019 08:01:47 +0000 (08:01 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 15 Mar 2019 08:01:47 +0000 (08:01 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@17961 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/plugin.rb

index 073eb3eb614822ba90b49c37438c3ee784fe50bb..ccfb6c4d0438511e557f00ce8f02fd3ae812780b 100644 (file)
@@ -269,7 +269,11 @@ module Redmine
       arg = { :version_or_higher => arg } unless arg.is_a?(Hash)
       arg.assert_valid_keys(:version, :version_or_higher)
 
-      plugin = Plugin.find(plugin_name)
+      begin
+        plugin = Plugin.find(plugin_name)
+      rescue PluginNotFound
+        raise PluginRequirementError.new("#{id} plugin requires the #{plugin_name} plugin")
+      end
       current = plugin.version.split('.').collect(&:to_i)
 
       arg.each do |k, v|