Class: GroongaQueryLog::Command::CheckCrash

Inherits:
GroongaQueryLog::CommandLine show all
Defined in:
lib/groonga-query-log/command/check-crash.rb

Defined Under Namespace

Classes: Checker, GroongaProcess, ProcessEnumerator

Instance Method Summary collapse

Constructor Details

#initializeCheckCrash

Returns a new instance of CheckCrash.



25
26
27
# File 'lib/groonga-query-log/command/check-crash.rb', line 25

def initialize
  setup_options
end

Instance Method Details

#run(arguments) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/groonga-query-log/command/check-crash.rb', line 29

def run(arguments)
  begin
    log_paths = @option_parser.parse!(arguments)
  rescue OptionParser::InvalidOption => error
    $stderr.puts(error)
    return false
  end

  begin
    check(log_paths)
  rescue Interrupt
  rescue Error
    $stderr.puts($!.message)
    return false
  end

  true
end