From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: Dynamic modules: should should-error work? Date: Mon, 07 Dec 2015 20:09:49 +0000 Message-ID: References: <838u5p3n32.fsf@gnu.org> <83si3wzdeb.fsf@gnu.org> <83mvu3xkfn.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114423380969ec05265471d5 X-Trace: ger.gmane.org 1449519019 4838 80.91.229.3 (7 Dec 2015 20:10:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Dec 2015 20:10:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 07 21:10:18 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 1a626z-0004ec-DH for ged-emacs-devel@m.gmane.org; Mon, 07 Dec 2015 21:10:17 +0100 Original-Received: from localhost ([::1]:56302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a626y-0004Rg-Hl for ged-emacs-devel@m.gmane.org; Mon, 07 Dec 2015 15:10:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a626k-0004RX-Lk for emacs-devel@gnu.org; Mon, 07 Dec 2015 15:10:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a626j-0007VY-Nr for emacs-devel@gnu.org; Mon, 07 Dec 2015 15:10:02 -0500 Original-Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:37246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a626h-0007V9-Tf; Mon, 07 Dec 2015 15:10:00 -0500 Original-Received: by wmww144 with SMTP id w144so2255288wmw.0; Mon, 07 Dec 2015 12:09:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=26+YcA5HsvWXuDLSAflH1cBTd0EkJGEqAFtL8DXGTtw=; b=TuWSgiRSfkkf0eHTm3lPPA97bUD4GcRoZVS6vrFCBUhMT0VbNG4NC2JXgWZiblAfUQ 360viY2An/C6qrjPpdunzMfiTrD8B8bSTDNwbOlSAFy8xTn2qplW35ly8YGwCk2+KpXx uzilC7/MXPj0zBZcgxBI7WvCmM+H5izSgQ9avCokXoehlCBibSZsPorcMcJVqgJfR5Ts I+farF/V/8WZD+sOWECCdZL0eriqJ4zvpTrTlDejL8vzUIck9sUcbhqs1+jmOWWG1oj6 xCRSXGH9yEdPS2cx4WczdfI7O5aPvvRljXSsMVimVI53OfIHOHnoBPnogGOe228iX55g TD7w== X-Received: by 10.28.134.199 with SMTP id i190mr224855wmd.33.1449518999102; Mon, 07 Dec 2015 12:09:59 -0800 (PST) In-Reply-To: <83mvu3xkfn.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22e 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:195970 Archived-At: --001a114423380969ec05265471d5 Content-Type: text/plain; charset=UTF-8 Eli Zaretskii schrieb am Di., 24. Nov. 2015 um 20:32 Uhr: > > From: Philipp Stephani > > Date: Tue, 24 Nov 2015 19:27:32 +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? --001a114423380969ec05265471d5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Di., 24. Nov. 2015 um 20:32=C2=A0Uhr:
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Tue, 24 Nov 2015 19:27:32 +0000
> Cc: emacs-dev= el@gnu.org
>
>=C2=A0 =C2=A0 =C2=A0+ (let ((descr (should-error (mod-test-sum 1 2 3)))= )
>=C2=A0 =C2=A0 =C2=A0+ (should (eq (car descr) 'wrong-number-of-argu= ments))
>
>
> I think testing using :type would also accept subtypes of the given ty= pe, which
> I think would be preferrable (I'd expect that generally subtypes o= f the
> documented signals are allowed to be thrown).

I'm not sure I understand what you are saying.=C2=A0 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 on= e of its conditions is X?=C2=A0
--001a114423380969ec05265471d5--