Function sys_set_errorlevel
You have the option of setting the Errorlevel at any time. Simply call the sys_set_errorlevel function with the desired Errorlevel.
Parameters
| Type | Use | Description |
|---|---|---|
Scalar |
Required |
Errorlevel to be set |
The Errorlevel provided must be numeric.
Returns
The function returns the previously set Errorlevel.
Examples
This example sets the Errorlevel and obtains the previous Errorlevel.
my $prev_errlvl = sys_set_errorlevel( 16 ); log_info( "The previous Errorlevel was $prev_errlvl" );
Additional Notes
The return value from this function is a numeric value representing the previous Errorlevel. A non-numeric value passed to this function will cause a fatal error.