From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Dynamic modules: should should-error work? Date: Mon, 07 Dec 2015 22:18:34 +0200 Message-ID: <83lh96c8rp.fsf@gnu.org> References: <838u5p3n32.fsf@gnu.org> <83si3wzdeb.fsf@gnu.org> <83mvu3xkfn.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1449519548 13322 80.91.229.3 (7 Dec 2015 20:19:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Dec 2015 20:19:08 +0000 (UTC) Cc: emacs-devel@gnu.org To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 07 21:19:00 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a62FP-0003la-Ab for ged-emacs-devel@m.gmane.org; Mon, 07 Dec 2015 21:18:59 +0100 Original-Received: from localhost ([::1]:56328 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a62FO-00077i-P5 for ged-emacs-devel@m.gmane.org; Mon, 07 Dec 2015 15:18:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a62FB-00076V-2y for emacs-devel@gnu.org; Mon, 07 Dec 2015 15:18:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a62F7-0001RY-2K for emacs-devel@gnu.org; Mon, 07 Dec 2015 15:18:45 -0500 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:40023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a62F6-0001RT-QZ for emacs-devel@gnu.org; Mon, 07 Dec 2015 15:18:40 -0500 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NZ0004008269W00@mtaout24.012.net.il> for emacs-devel@gnu.org; Mon, 07 Dec 2015 22:11:26 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NZ000NC9832AH50@mtaout24.012.net.il>; Mon, 07 Dec 2015 22:11:26 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.180 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195971 Archived-At: > From: Philipp Stephani > Date: Mon, 07 Dec 2015 20:09:49 +0000 > Cc: emacs-devel@gnu.org > > > + (let ((descr (should-error (mod-test-sum 1 2 3)))) > > + (should (eq (car descr) 'wrong-number-of-arguments)) > > > > > > I think testing using :type would also accept subtypes of the given type, > which > > I think would be preferrable (I'd expect that generally subtypes of the > > documented signals are allowed to be thrown). > > I'm not sure I understand what you are saying. Can you give an > example? > > If it is documented that an error of type X is thrown, does that mean the error > symbol is exactly X or rather that one of its conditions is X? In general, the latter; but for wrong-number-of-arguments we know it has no additional conditions, so it will be exactly it and nothing else.