mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 23:11:38 +08: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
|
||||
plugins_directory = Rails.root + 'plugins'
|
||||
|
||||
if error.backtrace
|
||||
if error.backtrace && error.backtrace_locations
|
||||
plugin_path = error.backtrace_locations.lazy.map do |location|
|
||||
Pathname.new(location.absolute_path)
|
||||
.ascend
|
||||
|
Loading…
x
Reference in New Issue
Block a user