Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic SYNERGY (steve huntington)
Decrease font size
Increase font size
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
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 11-Aug-2005 22:32
User is offline View Users Profile Print this message


Coman Wakefield

Posts: 18
Joined: 1-Jun-2005

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
Report this to a Moderator Report this to a Moderator
 12-Aug-2005 09:56
User is offline View Users Profile Print this message


Lutz Zollikofer

Posts: 44
Joined: 31-Jul-2003

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic SYNERGY forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 15:34.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.