Class: Arkrb::ErrorParsing
- Inherits:
-
Object
- Object
- Arkrb::ErrorParsing
- Defined in:
- lib/arkrb/error_parsing.rb
Instance Method Summary collapse
- #install_command(error_output) ⇒ Object
- #sanitize!(command, error_output, command_opts = nil) ⇒ Object
Instance Method Details
#install_command(error_output) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/arkrb/error_parsing.rb', line 16 def install_command(error_output) missing_32_gcc = potential_errors[:missing_32_gcc] case error_output when /#{missing_32_gcc[:cause]}/im raise missing_32_gcc[:class], missing_32_gcc[:message] else raise_unknown_error('install', error_output) end end |
#sanitize!(command, error_output, command_opts = nil) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/arkrb/error_parsing.rb', line 4 def sanitize!(command, error_output, command_opts = nil) ark_exe_not_found = potential_errors[:ark_exe_not_found] raise ark_exe_not_found[:class], ark_exe_not_found[:message] if error_output =~ /#{ark_exe_not_found[:cause]}/im case command when :install install_command(error_output) else raise_unknown_error(command, error_output, command_opts) end end |