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 aGitHub 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.
Class dmd.errors.ErrorSinkCompiler
Error message sink for D compiler.
Owns the gating logic (gag handling, error limit, warning/deprecation modes)
and delegates the actual output to the virtual emit method, which
subclasses such as ErrorSinkSarif override to change format.
Fields
| Name | Type | Description |
|---|---|---|
errorLimit
|
uint | Maximum number of errors/deprecations to display before calling fatal.
0 means unlimited.
|
showGaggedErrors
|
bool | print gagged errors anyway |
useDeprecated
|
DiagnosticReporting | how use of deprecated features are handled |
useWarnings
|
DiagnosticReporting | how compiler warnings are handled |
Methods
| Name | Description |
|---|---|
emit
(loc, format, ap, kind, supplemental, gagged)
|
Format and write a single diagnostic that has already passed the gating
checks. Default implementation prints coloured text to stderr (or stdout
for plain messages); ErrorSinkSarif overrides this to
write SARIF JSON instead.
|
emitAdditionalContext
()
|
Returns true if auxillary error reporting functions like printCandidates, getMatchError or
getParamError should print additional information.
|
factory
(classname)
|
Create instance of class specified by the fully qualified name classname. The class must either have no constructors or have a default constructor. |
opCmp
(o)
|
Compare with another Object obj. |
opEquals
(o)
|
Test whether this is equal to o.
The default implementation only compares by identity (using the is operator).
Generally, overrides and overloads for opEquals should attempt to compare objects by their contents.
A class will most likely want to add an overload that takes your specific type as the argument
and does the content comparison. Then you can override this and forward it to your specific
typed overload with a cast. Remember to check for null on the typed overload.
|
plugSink
()
|
This will be called to indicate compilation has either finished or terminated, no more errors are possible - it's now the time to print any stored errors. |
toHash
()
|
Compute hash function for Object. |
toString
()
|
Convert Object to a human readable string. |
Authors
License
Copyright © 1999-2026 by the D Language Foundation | Page generated by ddox.