feat: fix errors and add tests for BigInt changes
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
use std::string::FromUtf8Error;
|
||||
|
||||
use num_bigint::BigInt;
|
||||
|
||||
use crate::ast::{NamedDeBruijn, Term, Type};
|
||||
|
||||
use super::{ExBudget, Value};
|
||||
@@ -37,9 +39,9 @@ pub enum Error {
|
||||
#[error("Decoding utf8")]
|
||||
Utf8(#[from] FromUtf8Error),
|
||||
#[error("Out of Bounds\n\nindex: {}\nbytestring: {}\npossible: 0 - {}", .0, hex::encode(.1), .1.len() - 1)]
|
||||
ByteStringOutOfBounds(i128, Vec<u8>),
|
||||
ByteStringOutOfBounds(BigInt, Vec<u8>),
|
||||
#[error("Divide By Zero\n\n{0} / {1}")]
|
||||
DivideByZero(i128, i128),
|
||||
DivideByZero(BigInt, BigInt),
|
||||
#[error("Ed25519S PublicKey should be 32 bytes but it was {0}")]
|
||||
UnexpectedEd25519PublicKeyLength(usize),
|
||||
#[error("Ed25519S Signature should be 64 bytes but it was {0}")]
|
||||
|
||||
Reference in New Issue
Block a user