Class: LanguageOperator::CLI::Errors::ThorCompatibleError

Inherits:
Thor::Error
  • Object
show all
Defined in:
lib/language_operator/cli/errors/thor_errors.rb

Overview

Base error class that integrates properly with Thor's error handling while providing specific exit codes for different error types

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, exit_code = 1) ⇒ ThorCompatibleError

Returns a new instance of ThorCompatibleError.



13
14
15
16
# File 'lib/language_operator/cli/errors/thor_errors.rb', line 13

def initialize(message = nil, exit_code = 1)
  super(message)
  @exit_code = exit_code
end

Instance Attribute Details

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



11
12
13
# File 'lib/language_operator/cli/errors/thor_errors.rb', line 11

def exit_code
  @exit_code
end