murex Shell Docs

Command Reference: err

Print a line to the STDERR

Description

Write parameters to STDERR with a trailing new line character.

Usage

err: string to write -> <stderr>

Examples

» err Hello, World!
Hello, World!

Detail

err outputs as string data-type. This can be changed by casting

err { "Code": 404, "Message": "Page not found" } ? cast json

However passing structured data-types along the STDERR stream is not recommended as any other function within your code might also pass error messages along the same stream and thus taint your structured data. This is why murex does not supply a tout function for STDERR. The recommended solution for passing messages like these which you want separate from your STDOUT stream is to create a new murex named pipe.

» pipe: --create messages
» bg { <messages> -> pretty }
» tout: <messages> json { "Code": 404, "Message": "Page not found" }
» pipe: --close messages
{
    "Code": 404,
    "Message": "Page not found"
}

ANSI Constants

err supports ANSI constants.

See Also

This site is rebuilt weekly, the content is automatically generated from murex's source code. Last built on Mon Oct 19 06:12:17 UTC 2020 against commit 81299cb81299cbf18c05a5d38bdde93a5f5a3c5ff005b27. Downloadable murex binaries are also built weekly. Current version is 1.0.0000 BETA which has been verified against tests.