Skip to content

Commit

Permalink
bus/call: Clarify error sources
Browse files Browse the repository at this point in the history
There is some confusion, likely created by me, that call() might not
throw an exception in the case of a method call returning a
METHOD_ERROR.

This commit clarifies that all errors are thrown, and that we do not
need redundant is_method_error() checks on the reesulting message.

Change-Id: Ic2b962961cf671bd562bce7ba47135ad89bf9371
Signed-off-by: William A. Kennington III <wak@google.com>
  • Loading branch information
wak-google committed Oct 12, 2018
1 parent 261e72b commit 079fb85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sdbusplus/bus.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ struct bus
}

/** @brief Perform a message call.
* Errors generated by this call come from underlying dbus
* related errors *AND* from any method call that results
* in a METHOD_ERROR. This means you do not need to check
* is_method_error() on the returned message.
*
* @param[in] m - The method_call message.
* @param[in] timeout_us - The timeout for the method call.
Expand Down

0 comments on commit 079fb85

Please sign in to comment.