package solidity-common

  1. Overview
  2. Docs

Module Solidity_exceptionsSource

1. Generic errors

Sourceexception InvariantBroken of string

Raised when an internal invariant is broken

Sourceexception SyntaxError of string * Solidity_common.pos

A syntax error

Sourceexception TypecheckError of string * Solidity_common.pos

An error occuring during the typecheck

2. Exceptions raised by the postprocessor

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

Raised when an immutable is updated outside a construction call

Raised when an immutable is set twice

Raised when a constant is set twice

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

Raised when a constant is updated

Raised when an immutable is read during construction

Sourceexception UndefinedConstant of Solidity_common.Ident.t

Raised when a constant is left undefined after construction

Sourceexception UndefinedImmutable of Solidity_common.Ident.t

Raised when an immutable is left undefined

Sourceexception ConstantCycle of Solidity_common.Ident.t list

Raised when constants are recursively defined

Sourceexception ConstantRequiringComputation of Solidity_common.Ident.t

Raised when a constant is defined with a non trivial expression

Sourceexception 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

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

Raised when there a variable name conflict

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

Raised when there a function name conflict

Sourceexception 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

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

Raised when trying to override a function that does not exist

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

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

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

Generic override error

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

Sourceexception ForbiddenReadAccess of Solidity_common.pos

Raised when a read access is made in a pure function

Sourceexception ForbiddenWritState of Solidity_common.pos

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

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

Raised when there is a selector conflict between functions

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

Raised when there is no placeholder in a modifier

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

Raised when a file global is not a constant

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

Innovation. Community. Security.