From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk (Zsh users list)
Subject: Re: Exception handling
Date: Fri, 11 Feb 2005 18:51:25 +0000 [thread overview]
Message-ID: <1050211185125.ZM25869@candle.brasslantern.com> (raw)
In-Reply-To: <200502111445.j1BEj2Mp021524@news01.csr.com>
On Feb 11, 2:45pm, Peter Stephenson wrote:
}
} I wrote the following test, with descriptions of what's going on. If
} it's interesting I can add bits to the archive.
It's interesting ... just two comments:
} # Raise an error, but don't show an error message.
} # This is a bit of a hack. (Surprised?)
} { ${*ERROR*} } 2>/dev/null
How about something a little neater, like { ${:?THROW} } instead? The
problem with relying on invalid syntax is that it might become valid
later. (Like "{ foo } always { bar }" did, for example.)
} # grrr.... if this is rerun, catch mustn't be an alias when we define
} # it as a function...
} unalias catch 2>/dev/null
If you used "function catch { ... }" you wouldn't need the unalias, but
if you need unalias you probably need "builtin unalias".
prev parent reply other threads:[~2005-02-11 18:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-11 14:45 Peter Stephenson
2005-02-11 18:51 ` Bart Schaefer [this message]
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=1050211185125.ZM25869@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@sunsite.dk \
/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.
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).