GNOME Bugzilla – Bug 613477
Return value obsolete: Glib::KeyFile::load_from_file
Last modified: 2010-06-08 15:40:01 UTC
The return value of Glib::KeyFile::load_from_file will never be false, instead an exception will be thrown if: - File doesn't exist. - File access is denied. - File is accessible but not a valid KeyFile. It returns true on success as expected but the application will terminate on fail if the exception is not caught. Fixing has to be delayed to an ABI-breaking release.
I fixed this in the glibmm-3maybe branch, with this commit: 2010-06-08 Murray Cumming <murrayc@murrayc.com> KeyFile: Remove bool return from methods that throw on error anyway. * glib/src/keyfile.[hg|ccg]: load_from_file(), load_from_data(), load_from_data_dirs(): Change the bool return type to void because they throw exceptions anyway. This fixes bug #613477 (Rob) Thanks. If you find more like this, a patch would be welcome.