Method: EZML::Exec::Generic#parse!

Defined in:
lib/ezml/exec.rb

#parse!Object

Parses the command-line arguments and runs the executable. Calls ‘Kernel#exit` at the end, so it never returns.

See Also:



21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/ezml/exec.rb', line 21

def parse!
  begin
    parse
  rescue Exception => e
    raise e if @options[:trace] || e.is_a?(SystemExit)

    $stderr.print "#{e.class}: " unless e.class == RuntimeError
    $stderr.puts "#{e.message}"
    $stderr.puts "  Use --trace for backtrace."
    exit 1
  end
  exit 0
end