mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-28 01:57:14 +02:00
Clarify expectations with error codes like G_IO_ERROR_FAILED
If an error code enumeration is expected to be extended in the future, people shouldn't compare explicitly against its generic "FAILED" value. https://bugzilla.gnome.org/show_bug.cgi?id=726775
This commit is contained in:
@@ -44,7 +44,10 @@ G_DEFINE_QUARK (g-io-error-quark, g_io_error)
|
||||
* g_io_error_from_errno:
|
||||
* @err_no: Error number as defined in errno.h.
|
||||
*
|
||||
* Converts errno.h error codes into GIO error codes.
|
||||
* Converts errno.h error codes into GIO error codes. The fallback
|
||||
* value %G_IO_ERROR_FAILED is returned for error codes not currently
|
||||
* handled (but note that future GLib releases may return a more
|
||||
* specific value instead).
|
||||
*
|
||||
* Returns: #GIOErrorEnum value for the given errno.h error number.
|
||||
**/
|
||||
@@ -229,9 +232,10 @@ g_io_error_from_errno (gint err_no)
|
||||
* g_io_error_from_win32_error:
|
||||
* @error_code: Windows error number.
|
||||
*
|
||||
* Converts some common error codes into GIO error codes. The
|
||||
* fallback value G_IO_ERROR_FAILED is returned for error codes not
|
||||
* handled.
|
||||
* Converts some common error codes into GIO error codes. The fallback
|
||||
* value %G_IO_ERROR_FAILED is returned for error codes not currently
|
||||
* handled (but note that future GLib releases may return a more
|
||||
* specific value instead).
|
||||
*
|
||||
* Returns: #GIOErrorEnum value for the given error number.
|
||||
*
|
||||
|
Reference in New Issue
Block a user