forked from len0rd/rockbox
Add error handling to the vbscript's EXEC method, so we get more meaningful info if a required command like 'lame' is missing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15568 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
28dfb54eeb
commit
69f0da7b40
1 changed files with 11 additions and 0 deletions
|
|
@ -169,6 +169,17 @@ Do
|
||||||
Case "EXEC"
|
Case "EXEC"
|
||||||
If bVerbose Then WScript.StdErr.WriteLine "> " & aLine(1)
|
If bVerbose Then WScript.StdErr.WriteLine "> " & aLine(1)
|
||||||
oShell.Run aLine(1), 0, true
|
oShell.Run aLine(1), 0, true
|
||||||
|
If Err.Number <> 0 Then
|
||||||
|
If Not bVerbose Then
|
||||||
|
WScript.StdErr.Write "> " & aLine(1) & ": "
|
||||||
|
End If
|
||||||
|
If Err.Number = &H80070002 Then ' Actually file not found
|
||||||
|
WScript.StdErr.WriteLine "command not found"
|
||||||
|
Else
|
||||||
|
WScript.StdErr.WriteLine Err.Description
|
||||||
|
End If
|
||||||
|
WScript.Quit 2
|
||||||
|
End If
|
||||||
Case "SYNC"
|
Case "SYNC"
|
||||||
If bVerbose Then WScript.StdErr.WriteLine "Syncing"
|
If bVerbose Then WScript.StdErr.WriteLine "Syncing"
|
||||||
WScript.StdOut.WriteLine aLine(1) ' Just echo what was passed
|
WScript.StdOut.WriteLine aLine(1) ' Just echo what was passed
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue