Method CompilerEnvironment()->PikeCompiler()->report()


Method report

void report(SeverityLevel severity, string filename, int linenumber, string subsystem, string message, mixed ... extra_args)

Description

Report a diagnostic from the compiler.

The default implementation attempts to call the first corresponding function in the active handlers in priority order:

  1. Call handler->report().

  2. Call handler->compile_warning() or handler->compile_error() depending on severity.

  3. Call compat->report().

  4. Call compat->compile_warning() or compat->compile_error() depending on severity.

  5. Fallback: Call CompilerEnvironment()->report() in the parent object.

The arguments will be as follows:

report()

The report() function will be called with the same arguments as this function.

compile_warning()/compile_error()

Depending on the severity either compile_warning() or compile_error() will be called.

They will be called with the filename, linenumber and formatted message as arguments.

Note that these will not be called for the NOTICE severity, and that compile_error() will be used for both ERROR and FATAL.

Note

In Pike 7.8 and earlier the report() function was not called in the handlers.

See also

CompilerEnvironment()->report()