View Full Version : #run error_level
NewsArchive
10-25-2017, 01:40 PM
I'm using the #run compiler directive to execute AmalgamateFiles.cmd.
If it fails, it sets the DOS error_level to 1, but I cannot determine
how to trap that using #run.
Do I need to have my cmd write it to an INI file, then use #getini to
read it?
Mike Hanson
www.boxsoft.net
NewsArchive
10-25-2017, 01:40 PM
Mike, Mike, Mike, <g>
> I'm using the #run compiler directive to execute AmalgamateFiles.cmd.
> If it fails, it sets the DOS error_level to 1, but I cannot determine
> how to trap that using #run.
RTFM!
If the function succeeds, the SB_ERROR preprocessor symbol value is
zero.
If the function fails, the SB_ERROR preprocessor symbol value is
nonzero.
The compiler can catch the "#run..." exit code in the built-in
"SB_ERROR" compiler variable.
--
Lee White
RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com
Creative Reporting: http://www.CreativeReporting.com
Product Release & Update Notices
http://twitter.com/DeveloperPLUS
NewsArchive
10-25-2017, 01:41 PM
LOL!
Thanks, Lee. In the meantime I coded it to use an INI file, and
extended it to display the text error message in the SB compile log.
Mike Hanson
www.boxsoft.net
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.