From: "hunt at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sources.redhat.com
Subject: [Bug tapsets/2861] user_string fault handling
Date: Fri, 30 Jun 2006 20:10:00 -0000 [thread overview]
Message-ID: <20060630191320.19280.qmail@sourceware.org> (raw)
In-Reply-To: <20060628164947.2861.hunt@redhat.com>
------- Additional Comments From hunt at redhat dot com 2006-06-30 19:13 -------
Subject: Re: user_string fault handling
On Thu, 2006-06-29 at 01:08 +0000, fche at redhat dot com wrote:
>
> > user_string(addr, 0) ==> same as above but prints warning
>
> The ", 0" setting is not helpful (nor is the "0" too informative). We
> don't print run-time warnings at the present, and for good reason: they
> are only noise.
Unless, of course, you are interested in that "noise". As a developer I
often want to see it.
> > user_string(addr, 1) ==> prints error message and sets lasterr
>
> I don't find the ", 1" is too informative.
How is it less informative than user_string2() as you proposed? I was
thinking it would be better to have parameters that modify the functions
behavior than lots of functions that do almost the same thing.
OK, here is what I am going to do for now.
user_string(addr:long) - returns "<unknown>" on error, otherwise no
warnings, errors, etc. This is simplest and cleanest and will satisfy
99.99% of uses.
user_string2(addr:long, err_msg:string) - Those who want to check for
errors and are afraid that files named "<unknown>" might confuse their
script can use this and give it something less likely to be a valid
filename or data. This could be renamed to user_string() too if/when we
change the translator.
user_string_warn(addr:long) - For debugging/developers. If copies are
failing often, maybe we want some more details. Not likely to be used
much, but I sometimes use something like it.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2861
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
next prev parent reply other threads:[~2006-06-30 19:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-28 18:56 [Bug tapsets/2861] New: " hunt at redhat dot com
2006-06-28 20:43 ` [Bug tapsets/2861] " fche at redhat dot com
2006-06-28 20:49 ` varap at us dot ibm dot com
2006-06-28 20:54 ` hien at us dot ibm dot com
2006-06-29 1:08 ` hunt at redhat dot com
2006-06-29 2:12 ` fche at redhat dot com
2006-06-29 3:16 ` James Dickens
2006-06-30 19:13 ` Martin Hunt
2006-06-29 9:31 ` jamesd dot wi at gmail dot com
2006-06-30 20:10 ` hunt at redhat dot com [this message]
2006-07-11 21:17 ` hunt at redhat dot com
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=20060630191320.19280.qmail@sourceware.org \
--to=sourceware-bugzilla@sourceware.org \
--cc=systemtap@sources.redhat.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).