mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Check backtrace and backtrace_locations before trying to print an error
... during plugin initialization.
This commit is contained in:
parent
f038f8f154
commit
38c05a4f07
@ -6,7 +6,7 @@ def plugin_initialization_guard(&block)
|
|||||||
rescue => error
|
rescue => error
|
||||||
plugins_directory = Rails.root + 'plugins'
|
plugins_directory = Rails.root + 'plugins'
|
||||||
|
|
||||||
if error.backtrace
|
if error.backtrace && error.backtrace_locations
|
||||||
plugin_path = error.backtrace_locations.lazy.map do |location|
|
plugin_path = error.backtrace_locations.lazy.map do |location|
|
||||||
Pathname.new(location.absolute_path)
|
Pathname.new(location.absolute_path)
|
||||||
.ascend
|
.ascend
|
||||||
|
Loading…
Reference in New Issue
Block a user