package solidity-common

  1. Overview
  2. Docs

1. Generic errors

exception InvariantBroken of string

Raised when an internal invariant is broken

exception SyntaxError of string * Solidity_common.pos

A syntax error

exception TypecheckError of string * Solidity_common.pos

An error occuring during the typecheck

2. Exceptions raised by the postprocessor

exception ImmutableUpdatedOutsideConstructor of Solidity_common.Ident.t * Solidity_common.pos

Raised when an immutable is updated outside a construction call

exception ImmutableUpdatedTwice of Solidity_common.Ident.t * Solidity_common.pos * Solidity_common.pos

Raised when an immutable is set twice

Raised when a constant is set twice

exception ConstantUpdated of Solidity_common.Ident.t * Solidity_common.pos

Raised when a constant is updated

exception ReadImmutable of Solidity_common.Ident.t * Solidity_common.pos

Raised when an immutable is read during construction

exception UndefinedConstant of Solidity_common.Ident.t

Raised when a constant is left undefined after construction

exception UndefinedImmutable of Solidity_common.Ident.t

Raised when an immutable is left undefined

exception ConstantCycle of Solidity_common.Ident.t list

Raised when constants are recursively defined

exception ConstantRequiringComputation of Solidity_common.Ident.t

Raised when a constant is defined with a non trivial expression

exception CalldataModified of Solidity_common.Ident.t * Solidity_common.pos

Raised when a calldata is modified

Raised when a local is read without having been initialized

exception VariableAlreadyDefined of Solidity_common.Ident.t * Solidity_common.pos

Raised when there a variable name conflict

exception FunctionAlreadyDefined of Solidity_common.Ident.t * Solidity_common.pos

Raised when there a function name conflict

exception ImmutableDefinedInInheritingContract of Solidity_common.Ident.t * Solidity_common.Ident.t * Solidity_common.pos

Raised when an immutable from an inherited contract is written

Raised when a non virtual function is overridden

exception UnexpectedOverride of Solidity_common.Ident.t * Solidity_common.pos

Raised when trying to override a function that does not exist

exception ExpectedOverride of Solidity_common.Ident.t * Solidity_common.pos

Raised when trying to override a virtual function without the keyword 'override'

exception WrongOverride of Solidity_common.Ident.t * Solidity_common.pos * string * string

Generic override error

exception NoOverrideMultipleFunDefs of Solidity_common.IdentSet.t * Solidity_common.Ident.t * Solidity_common.Ident.t

Raised when there is a conflict between inherited virtual functions and nothing overrides them.

Raised when a pure function reads a global

Raised when a pure/view function writes a global

Raised when a function calls another one with a less permissive mutability

exception ForbiddenReadAccess of Solidity_common.pos

Raised when a read access is made in a pure function

exception ForbiddenWritState of Solidity_common.pos

Raised when the state is written in a pure/view function

exception InconsistentVisibility of Solidity_common.Ident.t * string * Solidity_common.pos * Solidity_common.pos

Raised when there is a selector conflict between functions

exception MissingPlaceholderStatement of Solidity_common.Ident.t * Solidity_common.pos

Raised when there is no placeholder in a modifier

exception FileGlobalNotConstant of Solidity_common.Ident.t * Solidity_common.pos

Raised when a file global is not a constant

val invariant_broken : string -> 'a
val type_error : Solidity_common.pos -> ('a, Stdlib.Format.formatter, unit, unit, unit, 'b) Stdlib.format6 -> 'a
OCaml

Innovation. Community. Security.