Use feature 'required-binding'
[apps/agl-service-windowmanager-2017.git] / src / wm_error.cpp
1 /*
2  * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #include "wm_error.hpp"
17
18 namespace wm {
19
20 const char *errorDescription(WMError enum_error_number)
21 {
22     switch (enum_error_number){
23         case SUCCESS:
24             return "Success";
25         case FAIL:
26             return "Request failed";
27         case REQ_REJECTED:
28             return "Request is rejected, due to the policy rejection of the request.";
29         case REQ_DROPPED:
30             return "Request is dropped, because the high priority request is done";
31         case NOT_REGISTERED:
32             return "Not registered";
33         case TIMEOUT_EXPIRED:
34             return "Request is dropped, due to time out expiring";
35         case LAYOUT_CHANGE_FAIL:
36             return "Layout change fails, due to some reasons";
37         case NO_ENTRY:
38             return "No element";
39         case NO_LAYOUT_CHANGE:
40             return "No layout change(deactivate only)";
41         default:
42             return "Unknown error number. Window manager bug.";
43     }
44 }
45
46 }