2023-08-10 16:53:25 -04:00
|
|
|
# Copyright (c) HashiCorp, Inc.
|
|
|
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
|
|
2014-03-11 01:38:31 -04:00
|
|
|
module VagrantPlugins
|
|
|
|
|
module CommunicatorWinRM
|
|
|
|
|
module Errors
|
|
|
|
|
# A convenient superclass for all our errors.
|
|
|
|
|
class WinRMError < Vagrant::Errors::VagrantError
|
|
|
|
|
error_namespace("vagrant_winrm.errors")
|
|
|
|
|
end
|
|
|
|
|
|
2014-12-08 19:09:11 -05:00
|
|
|
class TransientError < WinRMError
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
class AuthenticationFailed < WinRMError
|
|
|
|
|
error_key(:authentication_failed)
|
2014-03-11 01:38:31 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
class ExecutionError < WinRMError
|
|
|
|
|
error_key(:execution_error)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
class InvalidShell < WinRMError
|
|
|
|
|
error_key(:invalid_shell)
|
|
|
|
|
end
|
|
|
|
|
|
2014-06-24 13:09:11 -04:00
|
|
|
class WinRMBadExitStatus < WinRMError
|
|
|
|
|
error_key(:winrm_bad_exit_status)
|
|
|
|
|
end
|
|
|
|
|
|
2014-03-11 01:38:31 -04:00
|
|
|
class WinRMNotReady < WinRMError
|
|
|
|
|
error_key(:winrm_not_ready)
|
|
|
|
|
end
|
2014-04-22 17:54:13 -04:00
|
|
|
|
|
|
|
|
class WinRMFileTransferError < WinRMError
|
|
|
|
|
error_key(:winrm_file_transfer_error)
|
|
|
|
|
end
|
2014-07-22 19:58:27 -04:00
|
|
|
|
2014-12-08 19:09:11 -05:00
|
|
|
class InvalidTransport < WinRMError
|
2014-07-22 19:58:27 -04:00
|
|
|
error_key(:invalid_transport)
|
|
|
|
|
end
|
2014-12-08 19:09:11 -05:00
|
|
|
|
|
|
|
|
class SSLError < WinRMError
|
|
|
|
|
error_key(:ssl_error)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
class ConnectionTimeout < TransientError
|
|
|
|
|
error_key(:connection_timeout)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
class Disconnected < TransientError
|
|
|
|
|
error_key(:disconnected)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
class ConnectionRefused < TransientError
|
|
|
|
|
error_key(:connection_refused)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
class ConnectionReset < TransientError
|
|
|
|
|
error_key(:connection_reset)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
class HostDown < TransientError
|
|
|
|
|
error_key(:host_down)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
class NoRoute < TransientError
|
|
|
|
|
error_key(:no_route)
|
|
|
|
|
end
|
2014-03-11 01:38:31 -04:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|