aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Qiu <zqiu@google.com>2015-11-19 10:53:32 -0800
committerchrome-bot <chrome-bot@chromium.org>2015-11-19 18:14:28 -0800
commitaa062b64f9b9e8eff0252f9023550f1ce0cbd348 (patch)
treef91d1ce65af9ad32a518bd8f93b4c28d182667e8
parent90af2e77d8c57d2d258e2e14eea53445e4c96252 (diff)
downloadsystem_api-aa062b64f9b9e8eff0252f9023550f1ce0cbd348.tar.gz
apmanager: add more meaningful D-Bus error codes
Currently, apmanager returns error code such as Config/Service/Manager to specify the origin of the error, not indicating the types of the error. So add some more meaningful error code definitions that will be returned by apmanager. Even though the current consumer of the apmanager doesn't use the returned error code (only the returned error message is logged), Use the more meaningful error code to allow future consumer to leverage it. Will remove the obsoleted error codes Config/Service/Manager once the apmanager is switched over to use the new error codes. BUG=None TEST=emerge-$BOARD system_api Change-Id: I0ddf8a1c7d483171d520b8b19d3494d03d6f2f26 Reviewed-on: https://chromium-review.googlesource.com/313196 Commit-Ready: Zeping Qiu <zqiu@chromium.org> Tested-by: Zeping Qiu <zqiu@chromium.org> Reviewed-by: Paul Stewart <pstew@chromium.org>
-rw-r--r--dbus/apmanager/dbus-constants.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/dbus/apmanager/dbus-constants.h b/dbus/apmanager/dbus-constants.h
index ace31da..96d180d 100644
--- a/dbus/apmanager/dbus-constants.h
+++ b/dbus/apmanager/dbus-constants.h
@@ -47,6 +47,16 @@ const char kHwMode80211ac[] = "802.11ac";
// Operation modes.
const char kOperationModeServer[] = "server";
const char kOperationModeBridge[] = "bridge";
+
+// D-Bus error codes.
+const char kErrorInternalError[] =
+ "org.chromium.apmanager.Error.InternalError";
+const char kErrorInvalidArguments[] =
+ "org.chromium.apmanager.Error.InvalidArguments";
+const char kErrorInvalidConfiguration[] =
+ "org.chromium.apmanager.Error.InvalidConfiguration";
+const char kErrorSuccess[] = "org.chromium.apmanager.Error.Success";
+
} // namespace apmanager
#endif // SYSTEM_API_DBUS_APMANAGER_DBUS_CONSTANTS_H_