Exception: KeySloth::KeySlothError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/keysloth/errors.rb

Overview

Базовый класс для всех ошибок KeySloth

Since:

  • 0.1.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, cause = nil) ⇒ KeySlothError

Инициализация ошибки с сообщением и причиной

Parameters:

  • message (String) (defaults to: nil) —

    Сообщение об ошибке

  • cause (Exception, nil) (defaults to: nil) —

    Исходная причина ошибки (опционально)

Since:

  • 0.1.0



10
11
12
13
# File 'lib/keysloth/errors.rb', line 10

def initialize(message = nil, cause = nil)
  super(message)
  @cause = cause
end

Instance Attribute Details

#cause ⇒ Exception? (readonly)

Возвращает исходную причину ошибки

Returns:

  • (Exception, nil) —

    Исходная причина ошибки или nil

Since:

  • 0.1.0



18
19
20
# File 'lib/keysloth/errors.rb', line 18

def cause
  @cause
end