2013-04-05 02:17:19 -03:00
|
|
|
require 'vagrant/errors'
|
|
|
|
|
2013-03-01 20:45:13 -03:00
|
|
|
module Vagrant
|
|
|
|
module LXC
|
|
|
|
module Errors
|
|
|
|
class ExecuteError < Vagrant::Errors::VagrantError
|
|
|
|
error_key(:lxc_execute_error)
|
2014-02-02 19:27:08 -02:00
|
|
|
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 20:45:13 -03:00
|
|
|
end
|
2014-02-02 19:27:08 -02:00
|
|
|
|
2013-09-28 22:37:31 -03:00
|
|
|
class NamespacesNotSupported < Vagrant::Errors::VagrantError
|
|
|
|
end
|
2013-04-08 22:06:13 -03:00
|
|
|
|
2015-01-08 02:17:29 -02:00
|
|
|
class LxcLinuxRequired < Vagrant::Errors::VagrantError
|
|
|
|
error_key(:lxc_linux_required)
|
|
|
|
end
|
|
|
|
|
2013-07-28 02:54:58 -03:00
|
|
|
class LxcNotInstalled < Vagrant::Errors::VagrantError
|
|
|
|
error_key(:lxc_not_installed)
|
|
|
|
end
|
|
|
|
|
2014-02-02 19:27:08 -02:00
|
|
|
class ContainerAlreadyExists < Vagrant::Errors::VagrantError
|
|
|
|
error_key(:lxc_container_already_exists)
|
|
|
|
end
|
|
|
|
|
2014-09-23 16:07:03 +04:00
|
|
|
class CommandNotSupported < Vagrant::Errors::VagrantError
|
|
|
|
error_key(:lxc_command_not_supported)
|
|
|
|
end
|
|
|
|
|
2013-04-08 22:06:13 -03:00
|
|
|
# Box related errors
|
2013-03-08 00:54:15 -03:00
|
|
|
class TemplateFileMissing < Vagrant::Errors::VagrantError
|
|
|
|
error_key(:lxc_template_file_missing)
|
|
|
|
end
|
2013-09-28 02:58:38 -03:00
|
|
|
class TemplatesDirMissing < Vagrant::Errors::VagrantError
|
|
|
|
error_key(:lxc_templates_dir_missing)
|
|
|
|
end
|
2013-04-08 22:06:13 -03:00
|
|
|
class RootFSTarballMissing < Vagrant::Errors::VagrantError
|
|
|
|
error_key(:lxc_invalid_box_version)
|
|
|
|
end
|
2013-06-08 01:13:51 -03:00
|
|
|
class IncompatibleBox < Vagrant::Errors::VagrantError
|
|
|
|
error_key(:lxc_incompatible_box)
|
2013-04-08 22:06:13 -03:00
|
|
|
end
|
2013-07-14 22:42:49 -07:00
|
|
|
class RedirNotInstalled < Vagrant::Errors::VagrantError
|
|
|
|
error_key(:lxc_redir_not_installed)
|
|
|
|
end
|
2013-03-01 20:45:13 -03:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|