vagrant-lxc-ng/lib/vagrant-lxc/errors.rb

56 lines
1.5 KiB
Ruby
Raw Permalink Normal View History

2013-04-05 05:17:19 +00:00
require 'vagrant/errors'
2013-03-01 23:45:13 +00:00
module Vagrant
module LXC
module Errors
class ExecuteError < Vagrant::Errors::VagrantError
error_key(:lxc_execute_error)
attr_reader :stderr, :stdout
def initialize(message, *args)
super
if message.is_a?(Hash)
@stderr = message[:stderr]
@stdout = message[:stdout]
end
end
2013-03-01 23:45:13 +00:00
end
class NamespacesNotSupported < Vagrant::Errors::VagrantError
end
2013-04-09 01:06:13 +00:00
class LxcLinuxRequired < Vagrant::Errors::VagrantError
error_key(:lxc_linux_required)
end
class LxcNotInstalled < Vagrant::Errors::VagrantError
error_key(:lxc_not_installed)
end
class ContainerAlreadyExists < Vagrant::Errors::VagrantError
error_key(:lxc_container_already_exists)
end
class CommandNotSupported < Vagrant::Errors::VagrantError
error_key(:lxc_command_not_supported)
end
2013-04-09 01:06:13 +00:00
# Box related errors
class TemplateFileMissing < Vagrant::Errors::VagrantError
error_key(:lxc_template_file_missing)
end
class TemplatesDirMissing < Vagrant::Errors::VagrantError
error_key(:lxc_templates_dir_missing)
end
2013-04-09 01:06:13 +00:00
class RootFSTarballMissing < Vagrant::Errors::VagrantError
error_key(:lxc_invalid_box_version)
end
2013-06-08 04:13:51 +00:00
class IncompatibleBox < Vagrant::Errors::VagrantError
error_key(:lxc_incompatible_box)
2013-04-09 01:06:13 +00:00
end
class RedirNotInstalled < Vagrant::Errors::VagrantError
error_key(:lxc_redir_not_installed)
end
2013-03-01 23:45:13 +00:00
end
end
end