Commit 5856e15e authored by jplang's avatar jplang

Include plugin name in the exception when the plugin required by...

Include plugin name in the exception when the plugin required by requires_redmine_plugin is not found (#31030).

Patch by Jérôme BATAILLE and Go MAEDA.

git-svn-id: https://svn.redmine.org/redmine/trunk@17960 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 0d980c92
......@@ -271,7 +271,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|
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment