narou.rb in narou-2.9.5 vs narou.rb in narou-3.0.0

- old
+ new

@@ -22,11 +22,14 @@ require_relative "lib/inventory" $development = Narou.commit_version.! begin - require "pry" if $development + if $development + require "pry" + require "awesome_print" + end rescue LoadError end global = Inventory.load("global_setting", :global) $display_backtrace = ARGV.delete("--backtrace") @@ -42,9 +45,12 @@ begin CommandLine.run(ARGV.map { |v| v.dup }) rescue SystemExit => e exit e.status +rescue SyntaxError => e + warn e + exit Narou::EXIT_ERROR_CODE rescue rescue_level => e warn $@.shift + ": #{e.message.encode(Encoding::UTF_8)} (#{e.class})" if $display_backtrace $@.each do |b| warn " from #{b}"