Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

emit_error() Function (Python)

Syntax

Python Syntax

Description

Generate an error message on the console from a Python automation script. The error message is preceded by the text error: .

When used in commit scripts, this function also causes the commit operation to fail.

Note:

If the jcs.emit_error string argument includes a null character sequence (\0), the script generates an Invalid number of arguments error. Additionally, if the string argument consists exclusively of an empty string or escape sequences (\n \t \b \v \f \r) and spaces, Junos OS does not emit any message.

Parameters

string

String describing the error.

Usage Examples

Release Information

Function introduced in Junos OS Release 16.1R1.