Exception: SshTresor::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ssh_tresor/error.rb

Constant Summary collapse

EXIT_GENERAL_ERROR =
1
EXIT_AGENT_CONNECTION_FAILED =
2
EXIT_KEY_NOT_FOUND =
3
EXIT_DECRYPTION_FAILED =
4

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, exit_code: EXIT_GENERAL_ERROR) ⇒ Error

Returns a new instance of Error.



12
13
14
15
# File 'lib/ssh_tresor/error.rb', line 12

def initialize(message, exit_code: EXIT_GENERAL_ERROR)
  super(message)
  @exit_code = exit_code
end

Instance Attribute Details

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



10
11
12
# File 'lib/ssh_tresor/error.rb', line 10

def exit_code
  @exit_code
end