class Cucumber::Cli::Main
def execute!(existing_runtime = nil)
def execute!(existing_runtime = nil) trap_interrupt runtime = runtime(existing_runtime) runtime.run! if Cucumber.wants_to_quit exit_unable_to_finish elsif runtime.failure? exit_tests_failed else exit_ok end rescue SystemExit => e @kernel.exit(e.status) rescue FileNotFoundException => e @err.puts(e.message) @err.puts("Couldn't open #{e.path}") exit_unable_to_finish rescue FeatureFolderNotFoundException => e @err.puts("#{e.message}. You can use `cucumber --init` to get started.") exit_unable_to_finish rescue ProfilesNotDefinedError, YmlLoadError, ProfileNotFound => e @err.puts(e.message) exit_unable_to_finish rescue Errno::EACCES, Errno::ENOENT => e @err.puts("#{e.message} (#{e.class})") exit_unable_to_finish rescue Exception => e @err.puts("#{e.message} (#{e.class})") @err.puts(e.backtrace.join("\n")) exit_unable_to_finish end