zsh-users
 help / color / mirror / code / Atom feed
* About zsh-users 8489 (exception handling)
@ 2005-09-27 23:47 DervishD
  2005-09-28  2:42 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: DervishD @ 2005-09-27 23:47 UTC (permalink / raw)
  To: Zsh Users

    Hi all :)

    In zsh-users 8489 Bart Schaeffer proposes using this syntax:

    { ${:?THROW} } 2>/dev/null

    instead of this one:

    { ${*ERROR*} } 2>/dev/null

    for generating the exception in "throw" function, since the
latter may become valid syntax in the future.

    Unfortunately, that doesn't work because ${:?...} *exits* from
the shell, so the valid syntax would be:

    ( ${:?THROW} ) 2>/dev/null

    For me, using a subshell just to generate the exception seems a
bit excessive. Is there any other way of generating an error (the
exception) without using a subshell and without using current invalid
syntax that could become valid in the future?

    Thanks a lot :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-09-29 10:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-27 23:47 About zsh-users 8489 (exception handling) DervishD
2005-09-28  2:42 ` Bart Schaefer
2005-09-28  8:43   ` DervishD
2005-09-28 15:18     ` Bart Schaefer
2005-09-29 10:31       ` DervishD

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).