mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 10:06:45 +08:00
Exceptions we use in the app should inherit off StandardError
This commit is contained in:
@ -1,4 +1,8 @@
|
||||
if SiteSetting.notification_email == SiteSetting.defaults[:notification_email]
|
||||
# don't crash for invalid hostname, which is possible in dev
|
||||
SiteSetting.notification_email = "noreply@#{Discourse.current_hostname}" rescue nil
|
||||
begin
|
||||
SiteSetting.notification_email = "noreply@#{Discourse.current_hostname}"
|
||||
rescue Discourse::InvalidParameters
|
||||
STDERR.puts "Discourse hostname: #{Discourse.current_hostname} is not a valid domain for emails!"
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user