1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/// Represent errors in docker-ctl
#[derive(thiserror::Error, Debug)]
#[allow(missing_docs)]
pub enum Error
{
  #[error("Container is already running.")]
  ContainerRunning,
  #[error("Container is not running.")]
  ContainerNotRunning,
  #[error("StdIO were not piped.")]
  StdIONotPiped,
  #[error("Missing username.")]
  MissingUsername,

  #[error("IO error: {0}.")]
  IOError(#[from] std::io::Error),
  #[error("Unknown environment variable: {0}.")]
  VarError(#[from] std::env::VarError),
}