leo-errors

Crates.io Authors License

This directory contains the code for the Errors for all the Leo crates.

The errors are inspired by rust in a few different ways:

The purpose of these errors is such that searching an error in the documentation, or online for help, becomes easier.

Common

The common section of this crate contains a few sub files:

Error Types

These are the different kinds of errors that are made in this crate. Note that if you want more information about the errors please check the crates documentation or the Error Index. All errors here with the exception of SnarkVM Errors have a 037 prefixed to their error codes.

ASG

The errors for the leo-asg crate. Its error codes will range from 3000-3999 and be prefixed with the characters ASG.

AST

The errors for the leo-ast crate. Its error codes will range from 2000-2999 and be prefixed with the characters AST.

CLI

The errors for the leo-lang crate. Its error codes will range from 7000-7999 and be prefixed with the characters CLI.

Compiler

The errors for the leo-compiler crate. Its error codes will range from 6000-6999 and be prefixed with the characters CMP.

Import

The errors for the leo-imports crate. Its error codes will range from 4000-4999 and be prefixed with the characters IMP.

Input

The errors for the leo-ast crate. Its error codes will range from 8000-8999 and be prefixed with the characters INP.

Package

The errors for the leo-package crate. Its error codes will range from 5000-5999 and be prefixed with the characters PAK.

Parser

The errors for the leo-parser crate. Its error codes will range from 0-999 and be prefixed with the characters PAR.

SnarkVM

The errors from SnarkVM that bubble up into Leo in some situations. For right now, they have an exit code of 1. When SnarkVM implements better error codes and messages, we can bubble them up.

State

The errors for the leo-state crate. Its error codes will range from 1000-1999 and be prefixed with the characters STA.