Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

message

Syntax

Description

Generate an error message that is immediately displayed to the user, typically on the standard error file descriptor. This is different from most script output, which is displayed only after the script generates the final result tree.

Junos OS op scripts, event scripts, and commit scripts prepend "error:" to the displayed message when generating text output. When generating XML output, the scripts place the output inside a <message> element, which is enclosed in an <xmn:error> element.

If the message statement is used in a commit script, the script will generate two errors and terminate the commit process. If the message statement is used in an event script, the script writes the message to the output file, if one is configured.

Attributes

message expression

XPath expression or string emitted as output.

SLAX Example

Release Information

Statement introduced in version 1.1 of the SLAX language, which is supported in Junos OS Release 12.2 and later releases.