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.
25 #include <app_private.h>
31 #define LOG_TAG "TIZEN_N_APPLICATION"
33 static const char* app_error_to_string(app_error_e error)
40 case APP_ERROR_INVALID_PARAMETER:
41 return "INVALID_PARAMETER";
43 case APP_ERROR_OUT_OF_MEMORY:
44 return "OUT_OF_MEMORY";
46 case APP_ERROR_INVALID_CONTEXT:
47 return "INVALID_CONTEXT";
49 case APP_ERROR_NO_SUCH_FILE:
50 return "NO_SUCH_FILE";
52 case APP_ERROR_ALREADY_RUNNING:
53 return "ALREADY_RUNNING";
60 int app_error(app_error_e error, const char* function, const char *description)
64 LOGE("[%s] %s(0x%08x) : %s", function, app_error_to_string(error), error, description);
68 LOGE("[%s] %s(0x%08x)", function, app_error_to_string(error), error);