mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:34:31 +08:00
Allow NotFound
to specify an optional Location
for the resource
This commit is contained in:
@ -74,7 +74,13 @@ module Discourse
|
||||
end
|
||||
|
||||
# When something they want is not found
|
||||
class NotFound < StandardError; end
|
||||
class NotFound < StandardError
|
||||
attr_reader :location
|
||||
def initialize(opts = nil)
|
||||
opts ||= {}
|
||||
@location = opts[:location]
|
||||
end
|
||||
end
|
||||
|
||||
# When a setting is missing
|
||||
class SiteSettingMissing < StandardError; end
|
||||
|
Reference in New Issue
Block a user