Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!feed.xsnews.nl!border-1.ams.xsnews.nl!post-feeder-02.xsnews.nl!frontend-F10-14.ams.news.kpn.nl From: Cecil Westerhof Newsgroups: comp.lang.postscript Subject: Re: Checking the stack is empty at the end of the program Organization: Decebal Computing References: <874nba9xyd.fsf@Aspire.decebal.nl> <87txj9951i.fsf@Aspire.decebal.nl> <0034540c-4d60-42b6-9d32-f3357f719636@googlegroups.com> X-Face: "(y8cC@tg_12{">GF'UXTW]FHI2wMiZNrnf'1EFQ&O#$m:f#O7+7}kR,v+Pti8=Vi/Z"g^?b"E X-Homepage: http://www.decebal.nl/ Date: Thu, 01 Aug 2013 12:40:46 +0200 Message-ID: <87pptx8zip.fsf@Aspire.decebal.nl> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:Sb122aPZNsDK/5diaoJZGiWOFQo= MIME-Version: 1.0 Content-Type: text/plain Lines: 31 NNTP-Posting-Host: 77.171.42.144 X-Trace: 1375354004 news.kpn.nl 12568 77.171.42.144@kpn/77.171.42.144:34755 Xref: csiph.com comp.lang.postscript:1549 Op donderdag 1 aug 2013 11:37 CEST schreef luser: > On Thursday, August 1, 2013 3:41:29 AM UTC-5, Cecil Westerhof wrote: > >> >> Only one thing is missing. When the stack is not empty, I want to >> signal an error. In this way the calling script will terminate. Is >> this possible? >> > > Sure. In ghostscript, use `signalerror`. > > error-object error-name signalerror > > Now the error name should be one of the standard postscript > errors if you want to trip the normal mechanism. > But the error object can be an informative name. > > /STACK-NOT-EMPTY cvx /unregistered signalerror > > which results in: > Error: /unregistered in STACK-NOT-EMPTY > ...(normal error stack dumps) Works, thanks. Only one thing: I already showed the stack. Is it possible to circumvent the stack dumps? -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof