Exception: Loglevel::Exception
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Loglevel::Exception
- Defined in:
- lib/loglevel/exception.rb
Overview
Local exception classes to make handling exceptions easier
Constant Summary collapse
- UnknownLoggableClass =
We’ve been asked to setting up logging for an unknown class
Class.new(self)
- UnknownLoggerClass =
We can’t instantiate the defined logger class
Class.new(self)
- ClassNotLoggable =
The class we’ve been asked to set up logging for doesn’t understand logging
Class.new(self)
Class Method Summary collapse
Class Method Details
.handle_bad_class(class_name, exception, exception_class) ⇒ Object
12 13 14 15 |
# File 'lib/loglevel/exception.rb', line 12 def self.handle_bad_class(class_name, exception, exception_class) raise exception unless exception.class == NameError && exception. =~ /.+constant.+/ raise exception_class, class_name end |