![]() |
Telelogic SYNERGY (steve huntington) | ![]() |
Topic Title: CCM command sets %errorlevel% to 1 for errors _and_ warnings; how to distinguish between real error and warning? Topic Summary: CCM command sets %errorlevel% to 1 for errors _and_ warnings; how to distinguish between real error and warning? Created On: 11-Aug-2005 22:32 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
when I run commands via CCM (CLI), and they return a warning (i.e. you issue a CCM query that returns no records) it sets the %errorlevel% to 1.
Howevever, when you issue commands - i.e. ccm baseline - and the command fails (for example the baseline already exists) the %errorlevel% is also set to 1. I have a wrapper script which calls lots of ccm commands, and I would rather ignore/treat warnings differently from real errors but I can't distinguish by simply looking at %errorlevel% alone... does ccm always set the %errorlevel% to 0/1, or does it use different exit codes to signify different errors/warnings? Is there any other way to distinguish between errors and warning when running ccm commands from batch scripts? Thanks. -Alastair |
|
![]() |
|
![]() |
|
Hi!
I'm also very interested in this. Currently we're parsing the output for key pattern like error|ERROR. An additional question is: Do only errors print to STDERR and do warnings always print to STDOUT. If so, [ $?=1 -a ! -z $STDERR ] indicates an error. Thanks, Lutz |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.