[glibmm] Gio::Credentials, et al.: Add exception specs to errthrow
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Gio::Credentials, et al.: Add exception specs to errthrow
- Date: Sat, 7 Oct 2017 08:18:44 +0000 (UTC)
commit dbad103d667a6b72afcbb4b8df42fcab299b3081
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Sat Oct 7 10:16:22 2017 +0200
Gio::Credentials, et al.: Add exception specs to errthrow
gio/src/credentials.hg | 8 ++++----
gio/src/dbusconnection.hg | 20 ++++----------------
gio/src/dbusintrospection.hg | 4 +---
gio/src/dbusmessage.hg | 8 ++++----
gio/src/resource.hg | 16 ++++++++--------
gio/src/unixfdlist.hg | 4 ++--
gio/src/unixfdmessage.hg | 2 +-
7 files changed, 24 insertions(+), 38 deletions(-)
---
diff --git a/gio/src/credentials.hg b/gio/src/credentials.hg
index 620e295..7bbcdef 100644
--- a/gio/src/credentials.hg
+++ b/gio/src/credentials.hg
@@ -62,12 +62,12 @@ public:
_WRAP_METHOD(gpointer get_native(Type native_type), g_credentials_get_native)
_WRAP_METHOD(void set_native(Type native_type, gpointer native), g_credentials_set_native)
- _WRAP_METHOD(bool is_same_user(const Glib::RefPtr<const Credentials>& other_credentials),
g_credentials_is_same_user, errthrow)
+ _WRAP_METHOD(bool is_same_user(const Glib::RefPtr<const Credentials>& other_credentials),
g_credentials_is_same_user, errthrow "Gio::Error")
- _WRAP_METHOD(uid_t get_unix_user(), g_credentials_get_unix_user, errthrow, ifdef G_OS_UNIX)
- _WRAP_METHOD(bool set_unix_user(uid_t uid), g_credentials_set_unix_user, errthrow, ifdef G_OS_UNIX)
+ _WRAP_METHOD(uid_t get_unix_user(), g_credentials_get_unix_user, errthrow "Gio::Error", ifdef G_OS_UNIX)
+ _WRAP_METHOD(bool set_unix_user(uid_t uid), g_credentials_set_unix_user, errthrow "Gio::Error", ifdef
G_OS_UNIX)
- _WRAP_METHOD(pid_t get_unix_pid() const, g_credentials_get_unix_pid, errthrow, ifdef G_OS_UNIX)
+ _WRAP_METHOD(pid_t get_unix_pid() const, g_credentials_get_unix_pid, errthrow "Gio::Error", ifdef
G_OS_UNIX)
};
diff --git a/gio/src/dbusconnection.hg b/gio/src/dbusconnection.hg
index bac9315..f17992f 100644
--- a/gio/src/dbusconnection.hg
+++ b/gio/src/dbusconnection.hg
@@ -216,8 +216,6 @@ public:
*/
static void get(BusType bus_type, const SlotAsyncReady& slot);
- _WRAP_METHOD_DOCS_ONLY( g_bus_get_finish, errthrow)
- /// @throw Glib::Error.
_WRAP_METHOD(static Glib::RefPtr<Connection> get_finish(const Glib::RefPtr<AsyncResult>& res),
g_bus_get_finish, errthrow)
_WRAP_METHOD(static Glib::RefPtr<Connection> get_sync(BusType bus_type, const Glib::RefPtr<Cancellable>&
cancellable{?}), g_bus_get_sync, errthrow)
@@ -250,8 +248,6 @@ public:
const SlotAsyncReady& slot,
ConnectionFlags flags = Gio::DBus::ConnectionFlags::NONE);
- _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_finish)
- /// @throw Glib::Error.
_WRAP_METHOD(static Glib::RefPtr<Connection> create_finish(const Glib::RefPtr<AsyncResult>& res),
g_dbus_connection_new_finish, errthrow)
_WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_for_address)
@@ -278,12 +274,9 @@ public:
const SlotAsyncReady& slot,
ConnectionFlags flags = Gio::DBus::ConnectionFlags::NONE);
- _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_for_address_finish)
- /// @throw Glib::Error.
_WRAP_METHOD(static Glib::RefPtr<Connection> create_for_address_finish(const Glib::RefPtr<AsyncResult>&
res), g_dbus_connection_new_for_address_finish, errthrow)
- _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_sync)
- /// @throw Glib::Error.
+ _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_sync, errthrow)
static Glib::RefPtr<Connection> create_sync(
const Glib::RefPtr<IOStream>& stream,
const std::string& guid,
@@ -291,8 +284,7 @@ public:
const Glib::RefPtr<Cancellable>& cancellable,
ConnectionFlags flags = Gio::DBus::ConnectionFlags::NONE);
- _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_sync)
- /// @throw Glib::Error.
+ _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_sync, errthrow)
static Glib::RefPtr<Connection> create_sync(
const Glib::RefPtr<IOStream>& stream,
const std::string& guid,
@@ -312,16 +304,14 @@ public:
const std::string& guid,
ConnectionFlags flags = Gio::DBus::ConnectionFlags::NONE);
- _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_for_address_sync)
- /// @throw Glib::Error.
+ _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_for_address_sync, errthrow)
static Glib::RefPtr<Connection> create_for_address_sync(
const std::string& address,
const Glib::RefPtr<AuthObserver>& observer,
const Glib::RefPtr<Cancellable>& cancellable,
ConnectionFlags flags = Gio::DBus::ConnectionFlags::NONE);
- _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_for_address_sync)
- /// @throw Glib::Error.
+ _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_for_address_sync, errthrow)
static Glib::RefPtr<Connection> create_for_address_sync(
const std::string& address,
const Glib::RefPtr<Cancellable>& cancellable,
@@ -532,8 +522,6 @@ public:
int timeout_msec,
const SlotAsyncReady& slot);
- _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_send_message_with_reply_finish)
- /// @throw Glib::Error.
_WRAP_METHOD(Glib::RefPtr<Message> send_message_with_reply_finish(const Glib::RefPtr<AsyncResult>& res),
g_dbus_connection_send_message_with_reply_finish, errthrow)
/** Synchronously sends @a message to the peer represented by the connection
diff --git a/gio/src/dbusintrospection.hg b/gio/src/dbusintrospection.hg
index 387f3b7..cdebc86 100644
--- a/gio/src/dbusintrospection.hg
+++ b/gio/src/dbusintrospection.hg
@@ -135,9 +135,7 @@ class NodeInfo final
_IGNORE(g_dbus_node_info_ref, g_dbus_node_info_unref)
public:
- _WRAP_METHOD_DOCS_ONLY(g_dbus_node_info_new_for_xml)
- /// @throw Glib::Error.
- _WRAP_METHOD(static Glib::RefPtr<NodeInfo> create_for_xml(const Glib::ustring& xml_data),
g_dbus_node_info_new_for_xml, errthrow)
+ _WRAP_METHOD(static Glib::RefPtr<NodeInfo> create_for_xml(const Glib::ustring& xml_data),
g_dbus_node_info_new_for_xml, errthrow "Glib::MarkupError")
_WRAP_METHOD(Glib::RefPtr<InterfaceInfo> lookup_interface(const Glib::ustring& name),
g_dbus_node_info_lookup_interface, refreturn)
_WRAP_METHOD(Glib::RefPtr<const InterfaceInfo> lookup_interface(const Glib::ustring& name) const,
g_dbus_node_info_lookup_interface, constversion, refreturn)
diff --git a/gio/src/dbusmessage.hg b/gio/src/dbusmessage.hg
index bf57524..52d1208 100644
--- a/gio/src/dbusmessage.hg
+++ b/gio/src/dbusmessage.hg
@@ -75,14 +75,14 @@ public:
// Ignore variable argument functions.
_IGNORE(g_dbus_message_new_method_error, g_dbus_message_new_method_error_valist)
- _WRAP_METHOD(static Glib::RefPtr<Message> create_from_blob(const guchar* blob, gsize blob_len,
CapabilityFlags capabilities = CapabilityFlags::NONE), g_dbus_message_new_from_blob, errthrow)
+ _WRAP_METHOD(static Glib::RefPtr<Message> create_from_blob(const guchar* blob, gsize blob_len,
CapabilityFlags capabilities = CapabilityFlags::NONE), g_dbus_message_new_from_blob, errthrow "Gio::Error")
_WRAP_METHOD(Glib::ustring print(guint indent), g_dbus_message_print)
_WRAP_METHOD(bool get_locked() const, g_dbus_message_get_locked)
_WRAP_METHOD(void lock() ,g_dbus_message_lock)
- _WRAP_METHOD(Glib::RefPtr<Message> copy() const, g_dbus_message_copy, errthrow)
+ _WRAP_METHOD(Glib::RefPtr<Message> copy() const, g_dbus_message_copy, errthrow "Gio::Error")
_WRAP_METHOD(MessageType get_message_type() const, g_dbus_message_get_message_type)
_WRAP_METHOD(void set_message_type(MessageType type), g_dbus_message_set_message_type)
@@ -158,9 +158,9 @@ public:
_WRAP_METHOD(Glib::ustring get_arg0() const, g_dbus_message_get_arg0)
- _WRAP_METHOD(static gssize bytes_needed(const guchar* blob, gsize blob_len), g_dbus_message_bytes_needed,
errthrow)
+ _WRAP_METHOD(static gssize bytes_needed(const guchar* blob, gsize blob_len), g_dbus_message_bytes_needed,
errthrow "Gio::Error")
- _WRAP_METHOD(guchar* to_blob(gsize& out_size, CapabilityFlags capabilities = CapabilityFlags::NONE),
g_dbus_message_to_blob, errthrow)
+ _WRAP_METHOD(guchar* to_blob(gsize& out_size, CapabilityFlags capabilities = CapabilityFlags::NONE),
g_dbus_message_to_blob, errthrow "Gio::Error")
_WRAP_METHOD(void to_exception(), g_dbus_message_to_gerror, errthrow)
diff --git a/gio/src/resource.hg b/gio/src/resource.hg
index b8faa03..fda236b 100644
--- a/gio/src/resource.hg
+++ b/gio/src/resource.hg
@@ -133,13 +133,13 @@ public:
_WRAP_ENUM(Flags, GResourceFlags, newin "2,44")
_WRAP_ENUM(LookupFlags, GResourceLookupFlags, newin "2,44")
- _WRAP_METHOD(static Glib::RefPtr<Resource> create_from_data(const Glib::RefPtr<const Glib::Bytes>& data),
g_resource_new_from_data, errthrow, newin "2,44")
- _WRAP_METHOD(static Glib::RefPtr<Resource> create_from_file(const std::string& filename), g_resource_load,
errthrow, newin "2,44")
- _WRAP_METHOD(Glib::RefPtr<InputStream> open_stream(const std::string& path, LookupFlags lookup_flags =
LookupFlags::NONE) const, g_resource_open_stream, errthrow, newin "2,44")
- _WRAP_METHOD(Glib::RefPtr<const Glib::Bytes> lookup_data(const std::string& path, LookupFlags lookup_flags
= LookupFlags::NONE) const, g_resource_lookup_data, errthrow, newin "2,44")
+ _WRAP_METHOD(static Glib::RefPtr<Resource> create_from_data(const Glib::RefPtr<const Glib::Bytes>& data),
g_resource_new_from_data, errthrow "Glib::FileError", newin "2,44")
+ _WRAP_METHOD(static Glib::RefPtr<Resource> create_from_file(const std::string& filename), g_resource_load,
errthrow "Glib::FileError", newin "2,44")
+ _WRAP_METHOD(Glib::RefPtr<InputStream> open_stream(const std::string& path, LookupFlags lookup_flags =
LookupFlags::NONE) const, g_resource_open_stream, errthrow "Gio::ResourceError", newin "2,44")
+ _WRAP_METHOD(Glib::RefPtr<const Glib::Bytes> lookup_data(const std::string& path, LookupFlags lookup_flags
= LookupFlags::NONE) const, g_resource_lookup_data, errthrow "Gio::ResourceError", newin "2,44")
#m4 _CONVERSION(`char**',`std::vector<std::string>',`Glib::ArrayHandler<std::string>::array_to_vector($3,
Glib::OWNERSHIP_DEEP)')
- _WRAP_METHOD(std::vector<std::string> enumerate_children(const std::string& path, LookupFlags lookup_flags
= LookupFlags::NONE) const, g_resource_enumerate_children, errthrow, newin "2,44")
+ _WRAP_METHOD(std::vector<std::string> enumerate_children(const std::string& path, LookupFlags lookup_flags
= LookupFlags::NONE) const, g_resource_enumerate_children, errthrow "Gio::ResourceError", newin "2,44")
/** Looks for a file at the specified @a path in the resource and
* if found returns information about it.
@@ -185,9 +185,9 @@ public:
// 'register' is a keyword. Can't be the name of a method.
_WRAP_METHOD(void register_global(), g_resources_register, newin "2,44")
_WRAP_METHOD(void unregister_global(), g_resources_unregister, newin "2,44")
- _WRAP_METHOD(static Glib::RefPtr<InputStream> open_stream_global(const std::string& path, LookupFlags
lookup_flags = LookupFlags::NONE), g_resources_open_stream, errthrow, newin "2,44")
- _WRAP_METHOD(static Glib::RefPtr<const Glib::Bytes> lookup_data_global(const std::string& path,
LookupFlags lookup_flags = LookupFlags::NONE), g_resources_lookup_data, errthrow, newin "2,44")
- _WRAP_METHOD(static std::vector<std::string> enumerate_children_global(const std::string& path,
LookupFlags lookup_flags = LookupFlags::NONE), g_resources_enumerate_children, errthrow, newin "2,44")
+ _WRAP_METHOD(static Glib::RefPtr<InputStream> open_stream_global(const std::string& path, LookupFlags
lookup_flags = LookupFlags::NONE), g_resources_open_stream, errthrow "Gio::ResourceError", newin "2,44")
+ _WRAP_METHOD(static Glib::RefPtr<const Glib::Bytes> lookup_data_global(const std::string& path,
LookupFlags lookup_flags = LookupFlags::NONE), g_resources_lookup_data, errthrow "Gio::ResourceError", newin
"2,44")
+ _WRAP_METHOD(static std::vector<std::string> enumerate_children_global(const std::string& path,
LookupFlags lookup_flags = LookupFlags::NONE), g_resources_enumerate_children, errthrow "Gio::ResourceError",
newin "2,44")
/** Looks for a file at the specified @a path in the set of
* globally registered resources and if found returns information about it.
diff --git a/gio/src/unixfdlist.hg b/gio/src/unixfdlist.hg
index 75be402..f3885a1 100644
--- a/gio/src/unixfdlist.hg
+++ b/gio/src/unixfdlist.hg
@@ -65,7 +65,7 @@ public:
_WRAP_CREATE(const std::vector<int>& fds, int n_fds)
_WRAP_METHOD(int get_length() const, g_unix_fd_list_get_length)
- _WRAP_METHOD(int get(int index) const, g_unix_fd_list_get, errthrow)
+ _WRAP_METHOD(int get(int index) const, g_unix_fd_list_get, errthrow "Gio::Error")
/** Returns the array of file descriptors that is contained in this object.
*
@@ -96,7 +96,7 @@ public:
_WRAP_METHOD_DOCS_ONLY(g_unix_fd_list_append)
///@throw Glib::Error.
- _WRAP_METHOD(int append(int fd), g_unix_fd_list_append, errthrow)
+ _WRAP_METHOD(int append(int fd), g_unix_fd_list_append, errthrow "Gio::Error")
};
} // namespace Gio
diff --git a/gio/src/unixfdmessage.hg b/gio/src/unixfdmessage.hg
index 30a6e41..3398a0c 100644
--- a/gio/src/unixfdmessage.hg
+++ b/gio/src/unixfdmessage.hg
@@ -56,7 +56,7 @@ public:
_WRAP_METHOD(Glib::RefPtr<UnixFDList> get_fd_list(), g_unix_fd_message_get_fd_list, refreturn)
_WRAP_METHOD(Glib::RefPtr<const UnixFDList> get_fd_list() const, g_unix_fd_message_get_fd_list, refreturn,
constversion)
- _WRAP_METHOD(bool append_fd(int fd), g_unix_fd_message_append_fd, errthrow)
+ _WRAP_METHOD(bool append_fd(int fd), g_unix_fd_message_append_fd, errthrow "Gio::Error")
/** Returns the array of file descriptors that is contained in this object.
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]