Skip to content
Myr

error.rs

This file

Path

src/error.rs

66 lines · 2.6 KiB · Rust

Last changed by

Alternative performance metrics in the terminal (#986)David Peterbefore adoptionbdbfae9

History of this file

Take it

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

Bump clap_complete from 4.2.0 to 4.2.1dependabot[bot]before adoptionab5ae5f

lines 1–6why, one step back
1use std::num::{self, ParseFloatError, ParseIntError};
23use rust_decimal::Error as DecimalError;4use thiserror::Error;56#[derive(Debug, Error)]

Handle broken pipe errors on stdout gracefully (#932)jkbefore adoptionc0b3834

lines 7–10why, one step back
7#[error(transparent)]
8pub struct ConsoleOutputError(pub std::io::Error);910#[derive(Debug, Error)]

Bump clap_complete from 4.2.0 to 4.2.1dependabot[bot]before adoptionab5ae5f

lines 11–21why, one step back
11pub enum ParameterScanError {
12 #[error("Error while parsing parameter scan arguments ({0})")]13 ParseIntError(num::ParseIntError),14 #[error("Error while parsing parameter scan arguments ({0})")]15 ParseDecimalError(DecimalError),16 #[error("Empty parameter range")]17 EmptyRange,18 #[error("Parameter range is too large")]19 TooLarge,20 #[error("Zero is not a valid parameter step")]21 ZeroStep,

Merge pull request #951 from Likio3000/codex/reject-negative-parameter-stepsDavid Peterbefore adoption862625f

lines 22–23why, one step back
22 #[error("Parameter step size must be positive")]
23 NegativeStep,

Bump clap_complete from 4.2.0 to 4.2.1dependabot[bot]before adoptionab5ae5f

lines 24–43why, one step back
24 #[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")]
25 StepRequired,26 #[error("'--command-name' has been specified {0} times. It has to appear exactly once, or exactly {1} times (number of benchmarks)")]27 UnexpectedCommandNameCount(usize, usize),28}2930impl From<num::ParseIntError> for ParameterScanError {31 fn from(e: num::ParseIntError) -> ParameterScanError {32 ParameterScanError::ParseIntError(e)33 }34}3536impl From<DecimalError> for ParameterScanError {37 fn from(e: DecimalError) -> ParameterScanError {38 ParameterScanError::ParseDecimalError(e)39 }40}4142#[derive(Debug, Error)]43pub enum OptionsError<'a> {

Alternative performance metrics in the terminal (#986)David Peterbefore adoptionbdbfae9

lines 44–45why, one step back
44 #[error("{0}")]
45 InvalidMetrics(String),

Bump clap_complete from 4.2.0 to 4.2.1dependabot[bot]before adoptionab5ae5f

lines 46–66why, one step back
46 #[error(
47 "Conflicting requirements for the number of runs (empty range, min is larger than max)"48 )]49 EmptyRunsRange,50 #[error("Too many --command-name options: Expected {0} at most")]51 TooManyCommandNames(usize),52 #[error("'--command-name' has been specified {0} times. It has to appear exactly once, or exactly {1} times (number of benchmarks)")]53 UnexpectedCommandNameCount(usize, usize),54 #[error("Could not read numeric integer argument to '--{0}': {1}")]55 IntParsingError(&'a str, ParseIntError),56 #[error("Could not read numeric floating point argument to '--{0}': {1}")]57 FloatParsingError(&'a str, ParseFloatError),58 #[error("An empty command has been specified for the '--shell <command>' option")]59 EmptyShell,60 #[error("Failed to parse '--shell <command>' expression as command line: {0}")]61 ShellParseError(shell_words::ParseError),62 #[error("Unknown output policy '{0}'. Use './{0}' to output to a file named '{0}'.")]63 UnknownOutputPolicy(String),64 #[error("The file '{0}' specified as '--input' does not exist")]65 StdinDataFileDoesNotExist(String),66}