Listing 1: StopComputer Error-Handling Code Sub WriteError(ByVal itemName, ByVal number, _ ByVal description) ' Generic error handling. ' Sets m_ExitCode to the number passed; then ' handles output based on verbosity. If bare ' (m_Verbose = 0) then we write the itemName ' to stderr. ' If m_Verbose is default (+1) Then we just ' use itemName = FAIL # ' If m_Verbose = -1, then we write the above ' followed by descriptive text. m_ExitCode = number WScript.StdErr.Write itemName If m_Verbose = 0 Then WScript.StdErr.WriteLine Else WScript.StdErr.WriteLine " FAILED: " & _ number If m_Verbose = -1 Then _ WScript.StdErr.WriteLine description End If End Sub