Re: My build_filename() patch
- From: Fabrício Godoy <skarllot gmail com>
- To: Mark Roberts <gtkmm manumark de>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: My build_filename() patch
- Date: Mon, 26 Oct 2009 09:48:04 -0200
Hi,
2009/10/26 Mark Roberts
<gtkmm manumark de>
Dear Fabrício and list,
Your code includes this sort of code a few times:
path = g_build_filename(ustr1.c_str(), ustr2.c_str(), NULLPOINTER);
Glib::ustring r_path(path);
g_free(path);
return r_path;
Surely if out-of-memory, g_build_filename() will return 0 and ustring::ustring() will throw a bad-argument exception, which the customer will not understand. We want to throw the no-memory-exception, don't we?
All the best,
Mark
You're so right.
Unfortunately g_build_filename documentation[1] don't warns about any error.
Is there a standard way to throw exceptions into Glibmm?
Thank you.
References:
1-
http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Utility-Functions.html#g-build-filename
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]