mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 05:11:20 +08:00
FIX: Continue if checking themes if updating one fails (#19665)
This commit is contained in:

committed by
GitHub

parent
baccf7e5c9
commit
dfc449a32e
@ -932,6 +932,13 @@ module Discourse
|
||||
STDERR.puts "Failed to report exception #{e} #{message}"
|
||||
end
|
||||
|
||||
def self.capture_exceptions(message: "", env: nil)
|
||||
yield
|
||||
rescue Exception => e
|
||||
Discourse.warn_exception(e, message: message, env: env)
|
||||
nil
|
||||
end
|
||||
|
||||
def self.deprecate(warning, drop_from: nil, since: nil, raise_error: false, output_in_test: false)
|
||||
location = caller_locations[1].yield_self { |l| "#{l.path}:#{l.lineno}:in \`#{l.label}\`" }
|
||||
warning = ["Deprecation notice:", warning]
|
||||
|
Reference in New Issue
Block a user