Quirrel4.41.0

io.stderr

Defined in module "io"
from "io" import stderr

The process's standard error stream, already open as an io.file instance.

Notes

stderr is a separate stream from stdout; a tool that merges both into one log (as the reference tests do) only preserves their relative order because neither stream buffers, so every write lands as soon as it happens. stderr shares the process's handle rather than owning it, so close on it does nothing, the same as on stdout.

Example

examples/io/stderr.nut
from "io" import stdout, stderr

stdout.writestring("stdout line\n")
stderr.writestring("stderr line\n")   // a separate stream, merged into the same log by the shell

println(typeof stderr)                // "file": stderr is an io.file instance, not a special type
Output:
stdout line
stderr line
file

See also

stdoutThe process's standard output stream, already open as an io.file instance.
stdinThe process's standard input stream, already open as an io.file instance.
writestringWrites the string and returns the number of characters written
iomodule index