Exception: Vagrant::Node::ExceptionMutator
- Inherits:
-
RestException
- Object
- StandardError
- RestException
- Vagrant::Node::ExceptionMutator
- Includes:
- Errors
- Defined in:
- lib/vagrant-node/exceptions.rb
Instance Method Summary collapse
-
#initialize(exception) ⇒ ExceptionMutator
constructor
A new instance of ExceptionMutator.
Methods inherited from RestException
Constructor Details
#initialize(exception) ⇒ ExceptionMutator
Returns a new instance of ExceptionMutator.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/vagrant-node/exceptions.rb', line 34 def initialize(exception) if (exception.is_a?(Vagrant::Errors::VagrantError)) case exception when BaseVMNotFound, BoxNotFound, BoxSpecifiedDoesntExist, MachineNotFound, NetworkNotFound, ProviderNotFound, VMNotFoundError, VagrantfileExistsError super(404,exception.) when BoxNotSpecified, CLIInvalidOptions, CLIInvalidUsage, DestroyRequiresForce super(400,exception.) when ConfigInvalid, NameError, # ConfigValidationFailed, # DeprecationError, DownloaderFileDoesntExist, BoxProviderDoesntMatch, #BoxDownloadUnknownType, BoxAlreadyExists, ActiveMachineWithDifferentProvider, BoxUnpackageFailure, BoxUpgradeRequired, BoxVerificationFailed, VMImportFailure super(406,exception.) else super(500,exception.) end else super(500,exception.) end end |