Rename IOException to GIOException #371

Merged
jwharm merged 1 commit from gioexception into main 2026-06-14 13:52:07 +02:00
Owner

Starting with Java-GI 1.0.0-RC1, there are exception classes for GError types. The name is based on the error domain, so GLib.RegexError will throw a RegexException. However, for Gio.IOError this results in a class org.gnome.gio.IOException. This will cause a lot of confusion in code that handles java.io.IOException in the same file. Therefore, the exception for Gio.IOError will now be org.gnome.gio.GIOException.

The old class org.gnome.gio.IOException will be removed. It was only added in RC1 so I don't expect it to be used a lot in existing code. And the fix would be simple.

Starting with Java-GI 1.0.0-RC1, there are exception classes for GError types. The name is based on the error domain, so `GLib.RegexError` will throw a `RegexException`. However, for `Gio.IOError` this results in a class `org.gnome.gio.IOException`. This will cause a lot of confusion in code that handles `java.io.IOException` in the same file. Therefore, the exception for `Gio.IOError` will now be `org.gnome.gio.GIOException`. The old class `org.gnome.gio.IOException` will be removed. It was only added in RC1 so I don't expect it to be used a lot in existing code. And the fix would be simple.
Starting with Java-GI 1.0.0-RC1, there are exception classes for GError
types. The name is based on the error domain, so "GLib.RegexError" will
throw a "RegexException". However, for "Gio.IOError" this results in a
class "org.gnome.gio.IOException". This will cause a lot of confusion
in code that handles "java.io.IOException" in the same file. Therefore,
the exception for Gio.IOError will now be "org.gnome.gio.GIOException".
jwharm merged commit 1ae05860fc into main 2026-06-14 13:52:07 +02:00
jwharm deleted branch gioexception 2026-06-14 13:52:13 +02:00
Sign in to join this conversation.
No description provided.