binius_field/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright 2023-2024 Irreducible Inc.

/// Error thrown when a field operation fails.
#[derive(Clone, thiserror::Error, Debug)]
pub enum Error {
	#[error("the argument does not match the field extension degree")]
	ExtensionDegreeMismatch,
	#[error("the argument has too large a field extension degree")]
	ExtensionDegreeTooHigh,
	#[error("index {index} is out of range 0..{max}")]
	IndexOutOfRange { index: usize, max: usize },
	/// Thrown when trying to initialize a binary field element with a value bigger than what fits
	/// in the binary field.
	#[error("value is not in the field")]
	NotInField,
}