diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-11-11 08:31:37 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-11-11 08:31:37 +0000 |
commit | 69f0da7b402f6dbe3404c10e8804b904d6f2339b (patch) | |
tree | 7bd6b00e865bc1782cde787c999f19ad74d5027b /tools/sapi_voice.vbs | |
parent | 28dfb54eeb77b1c99972b3b5fa9f1d1fd97e04e4 (diff) | |
download | rockbox-69f0da7b402f6dbe3404c10e8804b904d6f2339b.tar.gz rockbox-69f0da7b402f6dbe3404c10e8804b904d6f2339b.zip |
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
Diffstat (limited to 'tools/sapi_voice.vbs')
-rwxr-xr-x | tools/sapi_voice.vbs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/sapi_voice.vbs b/tools/sapi_voice.vbs index a232b6f9e5..c29b5814d0 100755 --- a/tools/sapi_voice.vbs +++ b/tools/sapi_voice.vbs | |||
@@ -169,6 +169,17 @@ Do | |||
169 | Case "EXEC" | 169 | Case "EXEC" |
170 | If bVerbose Then WScript.StdErr.WriteLine "> " & aLine(1) | 170 | If bVerbose Then WScript.StdErr.WriteLine "> " & aLine(1) |
171 | oShell.Run aLine(1), 0, true | 171 | oShell.Run aLine(1), 0, true |
172 | If Err.Number <> 0 Then | ||
173 | If Not bVerbose Then | ||
174 | WScript.StdErr.Write "> " & aLine(1) & ": " | ||
175 | End If | ||
176 | If Err.Number = &H80070002 Then ' Actually file not found | ||
177 | WScript.StdErr.WriteLine "command not found" | ||
178 | Else | ||
179 | WScript.StdErr.WriteLine Err.Description | ||
180 | End If | ||
181 | WScript.Quit 2 | ||
182 | End If | ||
172 | Case "SYNC" | 183 | Case "SYNC" |
173 | If bVerbose Then WScript.StdErr.WriteLine "Syncing" | 184 | If bVerbose Then WScript.StdErr.WriteLine "Syncing" |
174 | WScript.StdOut.WriteLine aLine(1) ' Just echo what was passed | 185 | WScript.StdOut.WriteLine aLine(1) ' Just echo what was passed |