Skip to content
Myr

error.rs

This file

Path

src/error.rs

58 lines · 2.4 KiB · Rust

Last changed by

Change error messageDavid Peterbefore adoptione4790ab

History of this file

Take it

The walk stopped after 200 commits: lines older than 251a697 point at it.

Add new (hidden) --min-benchmarking-time optionDavid Peterbefore adoptiondffbdc3

line 1why, one step back
1use std::num::{self, ParseFloatError, ParseIntError};

Bump libc from 0.2.121 to 0.2.125dependabot[bot]before adoption251a697

lines 2–45why, one step back
2
3use rust_decimal::Error as DecimalError;4use thiserror::Error;56#[derive(Debug, Error)]7pub enum ParameterScanError {8 #[error("Error while parsing parameter scan arguments ({0})")]9 ParseIntError(num::ParseIntError),10 #[error("Error while parsing parameter scan arguments ({0})")]11 ParseDecimalError(DecimalError),12 #[error("Empty parameter range")]13 EmptyRange,14 #[error("Parameter range is too large")]15 TooLarge,16 #[error("Zero is not a valid parameter step")]17 ZeroStep,18 #[error("A step size is required when the range bounds are floating point numbers. The step size can be specified with the '-D/--parameter-step-size <DELTA>' parameter")]19 StepRequired,20 #[error("'--command-name' has been specified {0} times. It has to appear exactly once, or exactly {1} times (number of benchmarks)")]21 UnexpectedCommandNameCount(usize, usize),22}2324impl From<num::ParseIntError> for ParameterScanError {25 fn from(e: num::ParseIntError) -> ParameterScanError {26 ParameterScanError::ParseIntError(e)27 }28}2930impl From<DecimalError> for ParameterScanError {31 fn from(e: DecimalError) -> ParameterScanError {32 ParameterScanError::ParseDecimalError(e)33 }34}3536#[derive(Debug, Error)]37pub enum OptionsError<'a> {38 #[error(39 "Conflicting requirements for the number of runs (empty range, min is larger than max)"40 )]41 EmptyRunsRange,42 #[error("Too many --command-name options: Expected {0} at most")]43 TooManyCommandNames(usize),44 #[error("'--command-name' has been specified {0} times. It has to appear exactly once, or exactly {1} times (number of benchmarks)")]45 UnexpectedCommandNameCount(usize, usize),

Add new (hidden) --min-benchmarking-time optionDavid Peterbefore adoptiondffbdc3

lines 46–49why, one step back
46 #[error("Could not read numeric integer argument to '--{0}': {1}")]
47 IntParsingError(&'a str, ParseIntError),48 #[error("Could not read numeric floating point argument to '--{0}': {1}")]49 FloatParsingError(&'a str, ParseFloatError),

Bump libc from 0.2.121 to 0.2.125dependabot[bot]before adoption251a697

lines 50–53why, one step back
50 #[error("An empty command has been specified for the '--shell <command>' option")]
51 EmptyShell,52 #[error("Failed to parse '--shell <command>' expression as command line: {0}")]53 ShellParseError(shell_words::ParseError),

Address review commentsTavian Barnesbefore adoption3df63ba

line 54why, one step back
54 #[error("Unknown output policy '{0}'. Use './{0}' to output to a file named '{0}'.")]

Forbid --output=file without a path separatorTavian Barnesbefore adoptionefdf735

line 55why, one step back
55 UnknownOutputPolicy(String),

Change error messageDavid Peterbefore adoptione4790ab

line 56why, one step back
56 #[error("The file '{0}' specified as '--input' does not exist")]

Added --stdin-data argumentSteve Neasebefore adoptione38acdb

line 57why, one step back
57 StdinDataFileDoesNotExist(String),

Bump libc from 0.2.121 to 0.2.125dependabot[bot]before adoption251a697

line 58why, one step back
58}