Exception: Kotoshu::ResourceNotCachedError
- Defined in:
- lib/kotoshu/core/exceptions.rb
Overview
Error raised when a required resource is not cached and cannot be downloaded (offline mode or network failure).
Instance Attribute Summary collapse
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#resource_type ⇒ Object
readonly
Returns the value of attribute resource_type.
Instance Method Summary collapse
-
#initialize(language, resource_type) ⇒ ResourceNotCachedError
constructor
A new instance of ResourceNotCachedError.
Constructor Details
#initialize(language, resource_type) ⇒ ResourceNotCachedError
Returns a new instance of ResourceNotCachedError.
107 108 109 110 111 112 113 |
# File 'lib/kotoshu/core/exceptions.rb', line 107 def initialize(language, resource_type) @language = language @resource_type = resource_type super("Resource not cached: #{language}:#{resource_type}. " \ "Pre-fetch with `kotoshu cache download language #{language}` " \ "or disable offline mode (KOTOSHU_OFFLINE=0).") end |
Instance Attribute Details
#language ⇒ Object (readonly)
Returns the value of attribute language.
115 116 117 |
# File 'lib/kotoshu/core/exceptions.rb', line 115 def language @language end |
#resource_type ⇒ Object (readonly)
Returns the value of attribute resource_type.
115 116 117 |
# File 'lib/kotoshu/core/exceptions.rb', line 115 def resource_type @resource_type end |