Hi vladislavkasik
Unfortunately return value of cmdIDE.exe cannot be customized, but you can check the document: CodeWarrior
Development Tools IDE 5.9 Windows, Automation Guide
it is a guide of this tool and maybe you could use the onScriptError that abort or continue the script if a command fails.
Hope this information helps you, sorry for the inconveniences that this could cause you.
Have a great day,
Jorge Alcala