From e7326524e43bd9dfb37b5c75d85779476ee7cfe4 Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Mon, 4 Jun 2018 17:53:38 +0900 Subject: Add new error code and message Change-Id: Idb9dc7856f20493356fac24a7aac7b2678f625f8 Signed-off-by: Kazumasa Mitsunari --- src/wm-error.cpp | 6 +++++- src/wm-error.h | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/wm-error.cpp b/src/wm-error.cpp index 9f63065..ab1ea31 100644 --- a/src/wm-error.cpp +++ b/src/wm-error.cpp @@ -17,7 +17,7 @@ namespace wm { -static const char *errorDescription(WMError enum_error_number) +const char *errorDescription(WMError enum_error_number) { switch (enum_error_number){ case SUCCESS: @@ -28,8 +28,12 @@ static const char *errorDescription(WMError enum_error_number) return "Request is rejected, due to the policy rejection of the request."; case REQ_DROPPED: return "Request is dropped, because the high priority request is done"; + case NOT_REGISTERED: + return "Not registered"; case TIMEOUT_EXPIRED: return "Request is dropped, due to time out expiring"; + case LAYOUT_CHANGE_FAIL: + return "Layout change fails, due to some reasons"; default: return "Unknown error number. Window manager bug."; } diff --git a/src/wm-error.h b/src/wm-error.h index 9a06aa7..ce271b3 100644 --- a/src/wm-error.h +++ b/src/wm-error.h @@ -26,11 +26,14 @@ typedef enum WINDOWMANAGER_ERROR REQ_REJECTED, REQ_DROPPED, TIMEOUT_EXPIRED, + NOT_REGISTERED, + LAYOUT_CHANGE_FAIL, UNKNOWN, ERR_MAX = UNKNOWN -} WMError; +} +WMError; -static const char *errorDescription(WMError enum_error_number); +const char *errorDescription(WMError enum_error_number); } #endif // WINDOW_MANAGER_ERROR \ No newline at end of file -- cgit 1.2.3-korg