Lines Matching refs:VersionError
932 pub enum VersionError { enum
942 impl fmt::Display for VersionError { implementation
945 VersionError::Exec(err) => write!(f, "`gnuplot --version` failed: {}", err), in fmt()
946 VersionError::Error(msg) => { in fmt()
949 VersionError::OutputError => write!(f, "`gnuplot --version` returned invalid utf-8"), in fmt()
950 VersionError::ParseError(msg) => write!( in fmt()
958 impl ::std::error::Error for VersionError { implementation
961 VersionError::Exec(_) => "Execution Error", in description()
962 VersionError::Error(_) => "Other Error", in description()
963 VersionError::OutputError => "Output Error", in description()
964 VersionError::ParseError(_) => "Parse Error", in description()
970 VersionError::Exec(err) => Some(err), in cause()
987 pub fn version() -> Result<Version, VersionError> { in version()
991 .map_err(VersionError::Exec)?; in version()
994 String::from_utf8(command_output.stderr).map_err(|_| VersionError::OutputError)?; in version()
995 return Err(VersionError::Error(error)); in version()
998 let output = String::from_utf8(command_output.stdout).map_err(|_| VersionError::OutputError)?; in version()
1000 parse_version(&output).map_err(|_| VersionError::ParseError(output.clone())) in version()