Christopher Wiley | a4915c4 | 2014-03-27 14:45:37 -0700 | [diff] [blame] | 1 | // Copyright 2014 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include <base/logging.h> |
| 6 | |
| 7 | #include "buffet/dbus_utils.h" |
| 8 | |
| 9 | namespace buffet { |
| 10 | |
| 11 | namespace dbus_utils { |
| 12 | |
| 13 | scoped_ptr<dbus::Response> GetBadArgsError(dbus::MethodCall* method_call, |
| 14 | const std::string& message) { |
| 15 | LOG(ERROR) << "Error while handling DBus call: " << message; |
| 16 | scoped_ptr<dbus::ErrorResponse> resp(dbus::ErrorResponse::FromMethodCall( |
| 17 | method_call, "org.freedesktop.DBus.Error.InvalidArgs", message)); |
| 18 | return scoped_ptr<dbus::Response>(resp.release()); |
| 19 | } |
| 20 | |
| 21 | } // namespace dbus_utils |
| 22 | |
| 23 | } // namespace buffet |