Skip to content
Adam
Build and run

Diagnostics

Every mistake reported at your .adam line, in Adam's words.

A report

A mistake is reported at the .adam file, line and column, with a severity, a code and a message; an error stops the build before anything is built.

errorSM0200…/samples/diagnostics_narrowing.adam(33,13)
'int64' does not convert implicitly to 'int32'; write int32(...)

A report has one of four severities: Hint, Warning, Error or Fatal; only an Error or a Fatal stops the build. A build that reports an error ends adam with exit code 1. A warning leaves the program built:

warningSM0622…/samples/diagnostics_unreachable.adam(30,3)
unreachable statement: the statement before it ends the path (return, raise, leave, skip, a noreturn call or an endless loop), so it and what follows never run

Codes

A code is two capitals and four digits; the capitals name the part of adam that reports it (LX the lexer, PR the parser, SM the semantics, PJ the project file ..). Every code, its messages and its meaning are listed in the reference: Diagnostics.

The error budget

Once the errors reach the build's error budget, one Fatal DG0001 says so and later errors are not shown: fix the first errors first.

↑ ↓ moveEnter openEsc close