Exception: Hanami::Controller::UnknownFormatError

Inherits:
Error
  • Object
show all
Defined in:
lib/hanami/controller.rb

Overview

Unknown format error

This error is raised when a action sets a format that it isn't recognized both by `Hanami::Controller::Configuration` and the list of Rack mime types

See Also:

  • Action::Mime#format=

Since:

  • 0.2.0

Instance Method Summary collapse

Constructor Details

#initialize(format) ⇒ UnknownFormatError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of UnknownFormatError.

Since:

  • 0.2.0


45
46
47
# File 'lib/hanami/controller.rb', line 45

def initialize(format)
  super("Cannot find a corresponding Mime type for '#{ format }'. Please configure it with Hanami::Controller::Configuration#format.")
end