Adaptec 2410SA User Guide - Page 96

Error Handling, can test for a specific error using a series

Page 96 highlights

DOS Utilities Error Handling Because the ACU scripting feature is designed to run without user interaction, the ACU handles errors during record and playback by simply exiting immediately whenever an error is detected. Whenever the ACU encounters an error during record or playback-for example, an unrecognized keyword in a script file- it reports the error and exits. If a log file is opened, the ACU writes the error message to the log file. Otherwise, it displays the message on the screen. Upon exit, the ACU returns its exit status in the DOS environment variable ERRORLEVEL. When the ACU is run within a DOS batch file, that batch file can examine the ACU's exit status using the DOS command IF ERRORLEVEL n. The batch file can use this command to test the ACU success or failure status. The batch file can test for a specific error using a series of If ERRORLEVEL n commands. The table below lists the possible error codes returned by the ACU. Code 0 1 2 3 4 5 6 7 8 Description ACU ran without changes-The ACU exited with no errors (success) and no report is required. No controller found-The ACU did not detect any controllers in the system. Syntax or logical error in the script file-The ACU encountered an invalid command or keyword in the specified script file. Unable to open file-The ACU was unable to open the specified script or log file. Error in the command line parameters-You passed an invalid command-line switch to the ACU. (See Using the Scripting Features on page B-18 for the list of valid command switches.) Unable to read system configuration-The ACU was unable to get the configuration information from the specified controller. No drives detected-The ACU did not detect any devices attached to the selected controller. Specified drive not found in system-The device you specified does not exist on the selected controller. Specified array size too small-You specified an array size that is smaller than the minimum size allowed for this array. B-32

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153

B-32
DOS Utilities
Error Handling
Because the ACU scripting feature is designed to run without user
interaction, the ACU handles errors during record
and playback
by
simply exiting immediately whenever an error is detected.
Whenever the ACU encounters an error during record or
playback
for example, an unrecognized keyword in a script file
it reports the error and exits. If a log file is opened, the ACU writes
the error message to the log file. Otherwise, it displays the message
on the screen.
Upon exit, the ACU returns its exit status in the DOS environment
variable
ERRORLEVEL
. When the ACU is run within a DOS batch
file, that batch file can examine the ACU
s exit status using the
DOS command
IF
ERRORLEVEL
n
. The batch file can use this
command to test the ACU success or failure status. The batch file
can test for a specific error using a series of
If
ERRORLEVEL
n
commands.
The table below lists the possible error codes returned by the ACU.
Code
Description
0
ACU ran without changes
The ACU exited with no errors
(success) and no report is required.
1
No controller found
The ACU did not detect any controllers in
the system.
2
Syntax or logical error in the script file
The ACU encountered
an invalid
command
or keyword in the specified script file.
3
Unable to open file
The ACU was unable to open the specified
script or log file.
4
Error in the
command
line parameters
You passed an invalid
command
-line switch to the ACU. (See
Using the Scripting
Features
on page B-18
for the list of valid
command
switches.)
5
Unable to read system configuration
The ACU was unable to
get the configuration information from the specified controller.
6
No drives detected
The ACU did not detect any devices
attached to the selected controller.
7
Specified drive not found in system
The device you specified
does not exist on the selected controller.
8
Specified array size too small
You specified an array size that
is smaller than the minimum size allowed for this array.