Exception: Ptero::Exception

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ptero/exception.rb

Overview

The superclass of Ptero-related Exceptions

Direct Known Subclasses

ApplicationException, GeneratorException

Defined Under Namespace

Classes: ApplicationException, GeneratorException

Class Method Summary collapse

Class Method Details

.const_missing(const_name) ⇒ Object

Autoload exceptions



14
15
16
17
18
19
20
21
# File 'lib/ptero/exception.rb', line 14

def const_missing(const_name)
  # Require the exception
  require "#{__dir__}/exceptions/#{const_name.downcase}.rb"
  return const_get const_name
# If we couldn't load the file, throw an error
rescue LoadError
  super
end