From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Stop with an error signal
Date: Sun, 31 Oct 2010 05:25:30 +0100 [thread overview]
Message-ID: <1DE1D6A3-7A98-4981-96DF-C554172E9FF4@gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.01.1010301920550.25168@ybpnyubfg.ybpnyqbznva>
Am 31.10.2010 um 01:27 schrieb Aditya Mahajan:
> 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}
>
> This prints the error message on the terminal and exits. However the exit status (the value of $?) is 0, if the tui file has changed the document is compiled a second time anyways.
>
> How can I force context (the macro package) to exit with a status of 1 so that context (the program) does not attempt a second compilation?
\starttext
one
\scrollmode\undefined\forcequitjob{bye}
two
\stoptext
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2010-10-31 4:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-30 23:27 Aditya Mahajan
2010-10-31 4:25 ` Wolfgang Schuster [this message]
2010-10-31 4:44 ` Aditya Mahajan
2010-10-31 5:01 ` Aditya Mahajan
2010-10-31 5:04 ` Khaled Hosny
2010-10-31 5:08 ` Aditya Mahajan
2010-10-31 5:12 ` Khaled Hosny
2010-10-31 5:19 ` Aditya Mahajan
2010-10-31 8:46 ` Wolfgang Schuster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1DE1D6A3-7A98-4981-96DF-C554172E9FF4@gmail.com \
--to=schuster.wolfgang@googlemail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).