core/builtins/error.cif
changeset 0 7f656887cf89
equal deleted inserted replaced
-1:000000000000 0:7f656887cf89
       
     1 # error.cif
       
     2 # 
       
     3 # Copyright (c) 2010 Accenture. All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of the "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 # 
       
     9 # Initial Contributors:
       
    10 # Accenture - Initial contribution
       
    11 #
       
    12 
       
    13 ==name error
       
    14 
       
    15 ==short-description
       
    16 
       
    17 Exits with the given error. Useful in scripts.
       
    18 
       
    19 ==long-description
       
    20 
       
    21 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:
       
    22 
       
    23 	# Some setup...
       
    24 	var SOMEVARIABLE not-defined && error -6 "The variable SOMEVARIABLE must be defined before you run this script"
       
    25 	
       
    26 	# Rest of script...
       
    27 
       
    28 ==argument int error-number optional
       
    29 
       
    30 The error code to exit with. Must be negative. If not specified, defaults to C<KErrAbort> (-39).
       
    31 
       
    32 ==argument string text optional
       
    33 
       
    34 If specified, prints the given text to stderr before exiting.
       
    35 
       
    36 ==copyright
       
    37 
       
    38 Copyright (c) 2006-2010 Accenture. All rights reserved.
       
    39