From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63111 Path: news.gmane.org!not-for-mail From: Khaled Hosny Newsgroups: gmane.comp.tex.context Subject: Re: Stop with an error signal Date: Sun, 31 Oct 2010 07:04:10 +0200 Message-ID: <20101031050410.GA3136@khaled-laptop> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1288501473 23886 80.91.229.12 (31 Oct 2010 05:04:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 31 Oct 2010 05:04:33 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Oct 31 06:04:26 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PCQ5h-0001rU-4P for gctc-ntg-context-518@m.gmane.org; Sun, 31 Oct 2010 06:04:25 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D3D88CA7F7; Sun, 31 Oct 2010 06:04:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 13mFxmPlo4cy; Sun, 31 Oct 2010 06:04:21 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D3626CA7F2; Sun, 31 Oct 2010 06:04:20 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 69D8ACA7F2 for ; Sun, 31 Oct 2010 06:04:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id poXsHefK4PND for ; Sun, 31 Oct 2010 06:04:16 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 30B5ECA7E7 for ; Sun, 31 Oct 2010 06:04:16 +0100 (CET) Original-Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o9V54F4A008033 for ; Sun, 31 Oct 2010 06:04:15 +0100 Original-Received: by wwj40 with SMTP id 40so4483344wwj.2 for ; Sat, 30 Oct 2010 22:04:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=JyqN0c+AKXOvZOlzxjniykX0qFj3Su8ggYk8ciFPUg4=; b=GCE+FLjxWq28lQ9WdWid+nE33izw4ScvBazWkR3x99fJgPTcCyDDh6pQRBCCci5EKI 3FgMxzNapvg8FUVg87UIpQFJQDQP8SESTBneKXhdvmE5JokDoh+O4tRiNiLl6FnsDebi jv3FA2eURWONLpr05c7k6ZFDGIiBT1x0ZbbdE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=QogZg2f9HGArJDagRvHPD+FBCJZNB5nSGbNlAOFQdQdLTu5pOQxWBsqVQCaihYkvNP UfY3zksyuDH+OvjXVhpYED8yikofNv5/it8Gi66JgrIFm00lzX7FyieaF/i4+r6sqVQa Qkuvt8AMPtrumBdjPs5ig44g+QxgG4t9hOxJY= Original-Received: by 10.227.155.145 with SMTP id s17mr1561682wbw.64.1288501455377; Sat, 30 Oct 2010 22:04:15 -0700 (PDT) Original-Received: from localhost ([41.238.235.27]) by mx.google.com with ESMTPS id i19sm3816395wbe.17.2010.10.30.22.04.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 30 Oct 2010 22:04:14 -0700 (PDT) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.45; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0cDph4f78 - 00bc1818a507 - 20101031 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:63111 Archived-At: On Sat, Oct 30, 2010 at 07:27:02PM -0400, Aditya Mahajan wrote: > Hi, > > I want to write a macro that checks for some settings and if the > settings are wrong stop the current compilation and terminate with > an error message. Right now I have > > \def\ERROR > {\writeline > \showmessage\??externalfilter??{forbidden}\getexternalfilterdirectory > \batchmode > \normalend} Well, the first thought that came in my mind is using os.exit(1): \def\ERROR{\directlua{os.exit(1)}} But since this is pretty obvious, I'm sure I'm missing something. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________