delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/01/14/15:53:53

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Message-ID: <20160114205237.10408.qmail@stuge.se>
Date: Thu, 14 Jan 2016 21:52:37 +0100
From: "Peter Stuge (peter AT stuge DOT se) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] pcb behavior when invoked on invlalid file needs
to change
Mail-Followup-To: geda-user AT delorie DOT com
References: <CAC4O8c9J6LaRRmNNcV2jJKYV5J430gcB_=wQ5dRMXxc+1xe5JQ AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAC4O8c9J6LaRRmNNcV2jJKYV5J430gcB_=wQ5dRMXxc+1xe5JQ@mail.gmail.com>
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

Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com] wrote:
> pcb will put a parse error message in the log for you (which you may not
> even be viewing) and start editing a new blank pcb with the given file name
> remembered.
> 
> If you then do File->Save it will silently overwrite not_a_pcb_file.sch
> with an empty pcb file.

I strongly argue for hard fail on any open where a file has no valid data.

What is the failure mode?

If pcb is invoked from command line then it prints an error message
to stderr and exits with an error code. Any setup providing invalid
data needs to be fixed to not depend on the old failure mode.


If human selects File->Open or script opens a file, then after the
input validation failure pcb must be in the exact same state as
immediately before the open.

For notification in a GUI I think a modal dialog is a good approach.


//Peter

- Raw text -


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