SYNTAX

    error [options] [<error-number>] [<text>]


OPTIONS

-h (--help) bool

Display help.


ARGUMENTS

[<error-number>]

The error code to exit with. Must be negative. If not specified, defaults to KErrAbort (-39). [int]

[<text>]

If specified, prints the given text to stderr before exiting. [string]


DESCRIPTION

Exits with the given error. Useful in scripts.

This command exits with the given error and optionally prints the specified text to stderr. This is useful to abort scripts, for example as a precondition check:

    # Some setup...
    var SOMEVARIABLE not-defined && error -6 "The variable SOMEVARIABLE must be defined before you run this script"
    
    # Rest of script...


COPYRIGHT

Copyright (c) 2006-2010 Accenture. All rights reserved.