All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] More informative error messages from SAFE_*?
@ 2014-04-16  7:15 Mats Liljegren
  2014-04-16 15:52 ` chrubis
  2014-04-16 17:27 ` [LTP] [PATCH] Make SAFE_* calls more informative when failing Mats Liljegren
  0 siblings, 2 replies; 7+ messages in thread
From: Mats Liljegren @ 2014-04-16  7:15 UTC (permalink / raw)
  To: ltp-list

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?

Regards
Mats Liljegren

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

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

end of thread, other threads:[~2014-04-22 13:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-16  7:15 [LTP] More informative error messages from SAFE_*? Mats Liljegren
2014-04-16 15:52 ` chrubis
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.