summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2019-03-15 08:01:47 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2019-03-15 08:01:47 +0000
commit8caee099ede8be7b0d6ecc9e42d6fc4903885fc2 (patch)
tree5434c6a6aaa2e593569bdd36343159a165a52001
parent0adb3940a0ed11f68e7beb7c5f230795f139b726 (diff)
downloadredmine-8caee099ede8be7b0d6ecc9e42d6fc4903885fc2.tar.gz
redmine-8caee099ede8be7b0d6ecc9e42d6fc4903885fc2.zip
Merged r17960 to 4.0-stable (#31030).
git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@17961 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/redmine/plugin.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rb
index 073eb3eb6..ccfb6c4d0 100644
--- a/lib/redmine/plugin.rb
+++ b/lib/redmine/plugin.rb
@@ -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|