Module: Story::Errors
- Included in:
- Base
- Defined in:
- lib/story/meta.rb
Defined Under Namespace
Classes: ConnectionError, DatabaseError
Instance Method Summary
collapse
Instance Method Details
#check_on_error_page ⇒ Object
33
34
35
|
# File 'lib/story/meta.rb', line 33
def check_on_error_page
@on_error_page = request.path_info.downcase.match "/e_([a-z0-9_]+)"
end
|
#print_config_file_location ⇒ Object
13
14
15
|
# File 'lib/story/meta.rb', line 13
def print_config_file_location
"#{"STORY_GEM_ROOT/" if !(/#{Gem.dir}/ =~ file).is_a? NilClass }#{File.basename(File.dirname(file))}/#{File.basename(file)}"
end
|
#raise_no_database_specified(file, config) ⇒ Object
25
26
27
|
# File 'lib/story/meta.rb', line 25
def raise_no_database_specified file, config
"No database file or data specified in database config file (#{print_config_file_location})."
end
|
#raise_no_db_adapter_and_database_specified(file, config) ⇒ Object
29
30
31
|
# File 'lib/story/meta.rb', line 29
def raise_no_db_adapter_and_database_specified file, config
"No database file and data specified in database config file (#{print_config_file_location})."
end
|
#raise_no_db_adapter_specified(file, config) ⇒ Object
21
22
23
|
# File 'lib/story/meta.rb', line 21
def raise_no_db_adapter_specified file, config
"No database adapter specified in database config file (#{print_config_file_location})."
end
|
#raise_unsupported_db_adapter(file, config) ⇒ Object
17
18
19
|
# File 'lib/story/meta.rb', line 17
def raise_unsupported_db_adapter file, config
"Unsupported database adapter <b>#{config["adapter"]}</b> in database config file (#{print_config_file_location})."
end
|