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]" 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: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Precedence: bulk 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