diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2012-01-13 10:31:38 +0100 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2012-01-17 11:04:37 +0100 |
commit | ce59a217e2b2e80910316bf24f2556f828cb02a7 (patch) | |
tree | a248fdba1036df938296017ce00ca6c5387df3bd /src/gdbusxx | |
parent | 0fb196edce3ff44cc171eb3c1e0220a9f93d855d (diff) |
GDBus + GIO: added exception for failure to add signal watch
When adding a signal watch failed, no error was reported and the
caller couldn't check for success. Now an exception is thrown.
Diffstat (limited to 'src/gdbusxx')
-rw-r--r-- | src/gdbusxx/gdbus-cxx-bridge.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gdbusxx/gdbus-cxx-bridge.h b/src/gdbusxx/gdbus-cxx-bridge.h index 3af742d9..c95285d9 100644 --- a/src/gdbusxx/gdbus-cxx-bridge.h +++ b/src/gdbusxx/gdbus-cxx-bridge.h @@ -4139,6 +4139,13 @@ template <class T> class SignalWatch cb, this, NULL); + + if (!m_tag) { + throw std::runtime_error(std::string("activating signal failed: ") + + "path " + m_object.getPath() + + " interface " + m_object.getInterface() + + " member " + m_signal); + } } }; |