This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes General Computing and the fly likes DOS batch file error handling? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » General Computing
Bookmark "DOS batch file error handling?" Watch "DOS batch file error handling?" New topic
Author

DOS batch file error handling?

Alan Wanwierd
Ranch Hand

Joined: Jun 30, 2004
Posts: 624
I'm writing a batch file to join together a bunch of processes triggered by batch files... When everything works its great, but my error handling sucks. I've tried using the %ERRORLEVEL% variable to crudely trap my errors, but my outer calling batch file never goes into error:



The output I end up with is:



Obviously the Batch2.bat file is erroring - but the error is not being passed back. Is there a way around this?
 
GeeCON Prague 2014
 
subject: DOS batch file error handling?