Sha256: 3a3557650c6e9d46cfe9301455a9424c9a793fea21e93877cc2bef4b17194c64
Contents?: true
Size: 780 Bytes
Versions: 18
Compression:
Stored size: 780 Bytes
Contents
# frozen_string_literal: true require_relative "./cli/base" module NeetoDeploy class ExceptionHandler < CLI::Base attr_accessor :exception def initialize(exception) super() @exception = exception end def process case exception when Thor::RequiredArgumentMissingError ui.error( "#{exception.message}."\ ' Please use the "help" command to check all the required options and try again.' ) when Errno::ENOENT ui.error( "#{exception.message}."\ " Please check the given path and try again" ) when SystemExit ui.error( "Process exit with status code 1" ) else ui.error(exception.message) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems