deth
Version:
Ethereum node focused on Developer Experience
15 lines (14 loc) • 533 B
JavaScript
export function transactionNotFound(hash) {
return new Error(`Transaction ${hash} not found.`);
}
export function unsupportedBlockTag(operation, blockTag, use) {
let message = `${operation}: Unsupported blockTag "${blockTag}."`;
if (use && use.length > 0) {
const alternatives = use.map(x => `"${x}"`).join(' or ');
message += ` Use ${alternatives}.`;
}
return new Error(message);
}
export function unsupportedOperation(operation) {
return new Error(`${operation}: Unsupported operation.`);
}