2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
26 #define LOG_TAG "CAPI_APPFW_APPLICATION"
28 static const char* app_error_to_string(app_error_e error)
35 case APP_ERROR_INVALID_PARAMETER:
36 return "INVALID_PARAMETER";
38 case APP_ERROR_OUT_OF_MEMORY:
39 return "OUT_OF_MEMORY";
41 case APP_ERROR_INVALID_CONTEXT:
42 return "INVALID_CONTEXT";
44 case APP_ERROR_NO_SUCH_FILE:
45 return "NO_SUCH_FILE";
47 case APP_ERROR_ALREADY_RUNNING:
48 return "ALREADY_RUNNING";
55 int app_error(app_error_e error, const char* function, const char *description)
59 LOGE("[%s] %s(0x%08x) : %s", function, app_error_to_string(error), error, description);
63 LOGE("[%s] %s(0x%08x)", function, app_error_to_string(error), error);