View source code
Display the source code in dmd/errors.d from which this
page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a
Bugzilla 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 using
local 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/compiler/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. |
errorBackend(filename, linnum, charnum, format)
|
Callback for when the backend wants to report an error |
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. |
unescapeBackticks(buf)
|
Replace double backticks in buf with a single backtick
|
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. |
Structs
| Name | Description |
|---|---|
Diagnostic
|
Represents a diagnostic message generated during compilation, such as errors, warnings, or other messages. |
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(SourceLoc), 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(SourceLoc), 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-2026 by the D Language Foundation | Page generated by ddox.