Have you tried the methods mentioned under Manage Errors in the ENVI Help?
http://www.exelisvis.com/docs/ErrorHa...
This is using the new API. With the ENVI Classic API, when using the ENVI_BATCH_INIT, there is the ability to use /no_status_window and capture errors in the log file. The methods are similar for both new and Classic API.