Error String (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.

Synonyms

See Also


This document was generated from builtins/core/io/echo_doc.yaml.

This site's content is rebuilt automatically from murex's source code after each merge to the master branch. Downloadable murex binaries are also built with the website.

Last built on Tue Dec 10 22:56:57 UTC 2024 against commit 60f05a260f05a227caf73dd5b3478e3cb3f4bb24e46745b.

Current version is 6.4.1005 (develop) which has been verified against tests cases.