Skip to main content

emit_warning

Function emit_warning 

Source
pub fn emit_warning(
    name: &str,
    code: Option<&str>,
    message: &str,
    detail: Option<&str>,
)
Expand description

Port of internal/process/warning.js emitWarning: the warning is delivered on the NEXT TICK, not inline — first node’s default onWarning printer, then every process.on('warning') listener with the warning Error (name, message, and code/detail when given). It used to print synchronously, ahead of output the script wrote after the call, and the warning event never fired. --no-warnings (and --no-deprecation for deprecations) silences only the printer, as in node.