Exception: Eaco::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Eaco::Error
- Defined in:
- lib/eaco/error.rb
Overview
An Eaco Runtime Error.
Instance Method Summary collapse
-
#initialize(message) ⇒ Error
constructor
As we make use of heredoc for long error messages, squeeze subsequent spaces and remove newlines.
Constructor Details
#initialize(message) ⇒ Error
As we make use of heredoc for long error messages, squeeze subsequent spaces and remove newlines. If the message looks like an internal error though, newlines are preserved.
Example:
raise Eaco::Error, " Some fancy message\nend\n"
19 20 21 22 23 24 25 |
# File 'lib/eaco/error.rb', line 19 def initialize() unless =~ %r{EACO.+Error} = .squeeze(' ').gsub("\n", '') end super end |