From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] same functions everywhere From: Fco.J.Ballesteros In-Reply-To: <3EA6EADB.16078459@null.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-twrkscyndgqmtetotmrafnmpxw" Date: Fri, 25 Apr 2003 13:46:28 +0200 Topicbox-Message-UUID: 9949143a-eacb-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-twrkscyndgqmtetotmrafnmpxw Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit I just think that for whatever mechanism you want, if it's commonly used we could just put it in a library intended for the final application (and not for other library implementors, despite being bizarre). Actually, I kind of do that; most of the silly apps I write use a tiny utils.[ch] package that includes among other things emalloc, errealloc, catcherror, noerror and error (exceptions along the lines of the exception handling code in the kernel). I agree that each application should be able to do whatever it wants, and also that probably this code shouldnt get in the library by default; but I'd like to see several alternate libraries for error handling so that when I write an application (and not a library) I could borrow them. --upas-twrkscyndgqmtetotmrafnmpxw Content-Type: message/rfc822 Content-Disposition: inline Received: from mail.cse.psu.edu ([130.203.4.6]) by aquamar; Fri Apr 25 13:13:03 MDT 2003 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.8.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id F13A419B27; Fri, 25 Apr 2003 07:12:20 -0400 (EDT) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 8AF9E19B0D for <9fans@cse.psu.edu>; Fri, 25 Apr 2003 07:11:04 -0400 (EDT) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 1990dL-0001xX-00 for 9fans@cse.psu.edu; Fri, 25 Apr 2003 11:40:47 +0100 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: "Douglas A. Gwyn" Message-ID: <3EA6EADB.16078459@null.net> Organization: U.S. Army Research Laboratory Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: Subject: Re: [9fans] same functions everywhere Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 25 Apr 2003 10:40:40 GMT paurea@plan9.escet.urjc.es wrote: > On another terms, it would be great to have some function, macro, mechanism > or whatever to describe calling a function and calling sysfatal on error, because > this usage of functions repeats itself a lot. I would suggest instead installing a general exception package, with a global handler to field uncaught exceptions; the global handler could call sysfatal. --upas-twrkscyndgqmtetotmrafnmpxw--