View source code
Display the source code in dmd/errors.d from which thispage was generated on github.
Report a bug
If you spot a problem with this page, click here to create aBugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.Requires a signed-in GitHub account. This works well for small changes.If you'd like to make larger changes you may want to consider usinglocal clone.
Module dmd.errors
Functions for raising errors.
Documentation
https://dlang.org/phobos/dmd_errors.html
Coverage
https://codecov.io/gh/dlang/dmd/src/master/src/dmd/errors.d
Functions
Name | Description |
---|---|
deprecation(loc, format)
|
Print a deprecation message, may increase the global warning or error count depending on whether deprecations are ignored. |
deprecationSupplemental(loc, format)
|
Print additional details about a deprecation message. Doesn't increase the error count, or print an additional deprecation prefix. |
error(loc, format)
|
Print an error message, increasing the global error count. |
error(filename, linnum, charnum, format)
|
Same as above, but takes a filename and line information arguments as separate parameters. |
errorSupplemental(loc, format)
|
Print additional details about an error message. Doesn't increase the error count or print an additional error prefix. |
fatal()
|
Call this after printing out fatal error messages to clean up and exit the compiler. You can also set a fatalErrorHandler to override this behaviour. |
halt()
|
Try to stop forgetting to remove the breakpoints from release builds. |
message(loc, format)
|
Print a verbose message. Doesn't prefix or highlight messages. |
message(format)
|
Same as above, but doesn't take a location argument. |
tip(format)
|
Print a tip message with the prefix and highlighting. |
verrorReport(loc, format, ap, kind, p1, p2)
|
Implements error , warning , deprecation , message , and
tip . Report a diagnostic error, taking a va_list parameter, and
optionally additional message prefixes. Whether the message gets printed
depends on runtime values of DiagnosticReporting and global gagging.
|
verrorReportSupplemental(loc, format, ap, kind)
|
Implements errorSupplemental , warningSupplemental , and
deprecationSupplemental . Report an addition diagnostic error, taking a
va_list parameter. Whether the message gets printed depends on runtime
values of DiagnosticReporting and global gagging.
|
warning(loc, format)
|
Print a warning message, increasing the global warning count. |
warningSupplemental(loc, format)
|
Print additional details about a warning message. Doesn't increase the warning count or print an additional warning prefix. |
Classes
Name | Description |
---|---|
ErrorSinkCompiler
|
Error message sink for D compiler. |
Enums
Name | Description |
---|---|
Classification
|
Color highlighting to classify messages |
ErrorKind
|
Constants used to discriminate kinds of error messages. |
HIGHLIGHT
|
Embed these highlighting commands in the text stream. HIGHLIGHT.Escape indicates a Color follows. |
Global variables
Name | Type | Description |
---|---|---|
diagnosticHandler
|
bool delegate(ref const(Loc), dmd
|
The diagnostic handler. If non-null it will be called for every diagnostic message issued by the compiler. If it returns false, the message will be printed to stderr as usual. |
fatalErrorHandler
|
bool delegate()
|
The fatal error handler. If non-null it will be called for every fatal() call issued by the compiler. |
Aliases
Name | Type | Description |
---|---|---|
DiagnosticHandler
|
bool delegate(ref const(Loc), dmd
|
The type of the diagnostic handler see verrorReport for arguments |
FatalErrorHandler
|
bool delegate()
|
The type of the fatal error handler |
Authors
License
Copyright © 1999-2025 by the D Language Foundation | Page generated by ddox.