Exception: Discourse::NotFound

Inherits:
StandardError
  • Object
show all
Defined in:
lib/discourse.rb

Overview

When something they want is not found

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, status: 404, check_permalinks: false, original_path: nil, custom_message: nil) ⇒ NotFound

Returns a new instance of NotFound.



277
278
279
280
281
282
283
284
285
286
287
288
289
290
# File 'lib/discourse.rb', line 277

def initialize(
  msg = nil,
  status: 404,
  check_permalinks: false,
  original_path: nil,
  custom_message: nil
)
  super(msg)

  @status = status
  @check_permalinks = check_permalinks
  @original_path = original_path
  @custom_message = custom_message
end

Instance Attribute Details

Returns the value of attribute check_permalinks.



273
274
275
# File 'lib/discourse.rb', line 273

def check_permalinks
  @check_permalinks
end

#custom_messageObject (readonly)

Returns the value of attribute custom_message.



275
276
277
# File 'lib/discourse.rb', line 275

def custom_message
  @custom_message
end

#original_pathObject (readonly)

Returns the value of attribute original_path.



274
275
276
# File 'lib/discourse.rb', line 274

def original_path
  @original_path
end

#statusObject (readonly)

Returns the value of attribute status.



272
273
274
# File 'lib/discourse.rb', line 272

def status
  @status
end