delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2012/07/28/13:18:01

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Sat, 28 Jul 2012 10:10:31 -0700
From: Andrew Poelstra <asp11 AT sfu DOT ca>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] PCB's return code wrong
Message-ID: <20120728171031.GG13065@malakian.lan>
References: <20120709210244 DOT 60387819FB92 AT turkos DOT aspodata DOT se>
<20120724143816 DOT E52AD81A00CD AT turkos DOT aspodata DOT se>
<20120727171616 DOT CE83482827B2 AT turkos DOT aspodata DOT se>
<1343412018 DOT 39401 DOT YahooMailNeo AT web120705 DOT mail DOT ne1 DOT yahoo DOT com>
<20120727182142 DOT 7342182827C2 AT turkos DOT aspodata DOT se>
<1343426416 DOT 17733 DOT YahooMailNeo AT web120703 DOT mail DOT ne1 DOT yahoo DOT com>
<20120728091200 DOT 8588D82827D9 AT turkos DOT aspodata DOT se>
<5013F795 DOT 8050908 AT ecosensory DOT com>
<1343486783 DOT 57847 DOT YahooMailNeo AT web120702 DOT mail DOT ne1 DOT yahoo DOT com>
MIME-Version: 1.0
In-Reply-To: <1343486783.57847.YahooMailNeo@web120702.mail.ne1.yahoo.com>
User-Agent: Mutt/1.5.20 (2009-12-10)
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, Jul 28, 2012 at 07:46:23AM -0700, Edward Comer wrote:
> I wrote a shell script that causes pcb to export gerbers and I wanted to test for success/failure but I find that pcb returns 0 even upon failure.
>

This bugs me too. The problem is that pcb basically looks at
the -x parameter to check which exporter to use, hands off to
the exporter (through the do_export() function), and calls it
a day. When the exporter finishes, it returns 0.

If the exporter fails, it will abort early, but it has no way
to tell the main program that there was a problem.


The solution would be to change the HID interface so that do_export
returns an error code.


-- 
Andrew Poelstra
Email: asp11 at sfu.ca OR apoelstra at wpsoftware.net
Web:   http://www.wpsoftware.net/andrew
"You shouldn't trust every quote you read on the Internet." -- Socrates

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019