Skip to content

Commit

Permalink
better error
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Feb 2, 2025
1 parent 95ce6cd commit 72ef3db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yarn-project/foundation/src/fields/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export class Fr extends BaseField {
return fromHexString(buf, Fr);
}

throw new Error('Tried to create a Fr from an invalid string');
throw new Error(`Tried to create a Fr from an invalid string: ${buf}`);
}

/**
Expand Down Expand Up @@ -412,7 +412,7 @@ export class Fq extends BaseField {
return fromHexString(buf, Fq);
}

throw new Error('Tried to create a Fq from an invalid string');
throw new Error(`Tried to create a Fq from an invalid string: ${buf}`);
}

/**
Expand Down

0 comments on commit 72ef3db

Please sign in to comment.