def handle_exception(exception)
      case exception
      when HamlLint::Exceptions::ConfigurationError
        log.error exception.message
        Sysexits::EX_CONFIG
      when HamlLint::Exceptions::InvalidCLIOption
        log.error exception.message
        log.log "Run `#{APP_NAME}` --help for usage documentation"
        Sysexits::EX_USAGE
      when HamlLint::Exceptions::InvalidFilePath
        log.error exception.message
        Sysexits::EX_NOINPUT
      when HamlLint::Exceptions::NoLintersError
        log.error exception.message
        Sysexits::EX_NOINPUT
      else
        print_unexpected_exception(exception)
        Sysexits::EX_SOFTWARE
      end
    end
def handle_exception(exception)
      case exception
      when HamlLint::Exceptions::ConfigurationError
        log.error exception.message
        Sysexits::EX_CONFIG
      when HamlLint::Exceptions::InvalidCLIOption
        log.error exception.message
        log.log "Run `#{APP_NAME}` --help for usage documentation"
        Sysexits::EX_USAGE
      when HamlLint::Exceptions::InvalidFilePath
        log.error exception.message
        Sysexits::EX_NOINPUT
      when HamlLint::Exceptions::NoLintersError
        log.error exception.message
        Sysexits::EX_NOINPUT
      else
        print_unexpected_exception(exception)
        Sysexits::EX_SOFTWARE
      end
    end
Outputs a message and returns an appropriate error code for the specified
 exception.