Skip to main content

output.writeError

Write a structured error to stderr without exiting. Useful for non-fatal warnings.

Parameters

ParameterTypeDescription
codestringA machine-readable error code
messagestringA human-readable error description

Returns

void

Example

output.writeError("WARNING", "non-fatal issue");
// stderr: {"code":"WARNING","message":"non-fatal issue"}\n