public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Mats Liljegren <mats.liljegren@enea.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] More informative error messages from SAFE_*?
Date: Wed, 16 Apr 2014 17:52:15 +0200	[thread overview]
Message-ID: <20140416155215.GA3135@rei> (raw)
In-Reply-To: <20140416091527.40612b3c@mats-desktop>

Hi!
> I ran into problems when using SAFE_OPEN, it complained about a
> non-existing path. It didn't tell me what path it tried, which made
> debugging more difficult than necessary.
> 
> I'm prepared to change the error messages in safe_macros.c to have a
> syntax similar to what I plan for safe_open():
> 
> 		tst_brkm(TBROK | TERRNO, cleanup_fn,
> 			"%s:%d: open(%s,%d) failed",
> 			file, lineno, pathname, oflags);
> 
> 
> I skipped the creation mode parameter since it was too much work
> handling an optional parameter...
> 
> Would anyone see a point in having all functions using a similar error
> syntax?

Sounds good to me.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2014-04-16 15:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16  7:15 [LTP] More informative error messages from SAFE_*? Mats Liljegren
2014-04-16 15:52 ` chrubis [this message]
2014-04-16 17:27 ` [LTP] [PATCH] Make SAFE_* calls more informative when failing Mats Liljegren
2014-04-16 17:27   ` Mats Liljegren
2014-04-22 13:41     ` chrubis
2014-04-22 13:24   ` Mats Liljegren
2014-04-22 13:42     ` chrubis

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=20140416155215.GA3135@rei \
    --to=chrubis@suse.cz \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=mats.liljegren@enea.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