I don't think the current version exposes the call stack to the user.
I imagine it would be possible to add, say, a %_calldepth
variable and a %@callstack[n]
function to make this info available. Whether there would be much call demand for such a feature, I have no idea.
I see what you did there with that 'call' joke! hehehe
Basically I've written something I can run after, well, any BAT, EXE, or internal command, that will check the error level, and pause if it's 1.
It sets a REDO flag that I can use in my calling script to redo after fixing whatever error conditions.
just in the name of helpful messaging, i wanted it to say which program was creating the errorlevel automatically, without having to add anything special from the calling script
Basically i'm adding this:
...after, well, almost everything now!
It's helping some of my workflows immensely. For instance giving me a chance to fix source code to deal with unexpected things, and the program just re-runs until i get my source code right and there's no errorlevel and it passes my errorlevel.bat
But yea, the minor cosmetic+convenience issue of being able to say "it was *this* script -- points to calling script -- who made the bad errorlevel" would be great.
I was thinking it was impossible without some sort of setup from the calling script, which I wanted to avoid, as I'm going to be pasting "call errorlevel.bat" into 100s of places in my BAT files in the future...