wrt-plugins-tizen_0.4.23
[framework/web/wrt-plugins-tizen.git] / src / Calendar / JSCalendarManager.cpp
old mode 100755 (executable)
new mode 100644 (file)
index e99a712..29189ef
@@ -83,14 +83,14 @@ void JSCalendarManager::initialize(JSContextRef context,
         JSObjectRef object)
 {
     if (!JSObjectGetPrivate(object)) {
-        LogDebug("Create calendar manager private object.");
+        LoggerD("Create calendar manager private object.");
         ICalendarManagerPtr calendarManager = CalendarFactory::getInstance().createCalendarManagerObject();
         CalendarManagerPrivObject *privateObject = new CalendarManagerPrivObject(context, calendarManager);
         if (!JSObjectSetPrivate(object, static_cast<void*>(privateObject))) {
             delete privateObject;
         }
     } else {
-        LogDebug("Private object already set.");
+        LoggerD("Private object already set.");
     }
 }
 
@@ -157,22 +157,22 @@ JSValueRef JSCalendarManager::getCalendars(JSContextRef context,
     }
     Catch(UnsupportedException)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::NOT_SUPPORTED_ERROR, _rethrown_exception.GetMessage());
     }
     Catch(InvalidArgumentException)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::INVALID_VALUES_ERROR, _rethrown_exception.GetMessage());
     }
     Catch(ConversionException)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, _rethrown_exception.GetMessage());
     }
     Catch(Exception)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 }
@@ -217,7 +217,7 @@ JSValueRef JSCalendarManager::getDefaultCalendar(JSContextRef context,
                                TIME_TRACER_ITEM_END(__FUNCTION__, 0);
                 return converter.toJSValueRefCalendar(dplEvent->getCalendar());
             } else {
-                LogError("Default calendar not found.");
+                LoggerE("Default calendar not found.");
             }
         } else {
             ThrowMsg(UnknownException, "Getting a default calendar failed by unknown reason.");
@@ -225,27 +225,27 @@ JSValueRef JSCalendarManager::getDefaultCalendar(JSContextRef context,
     }
     Catch(UnsupportedException)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::NOT_SUPPORTED_ERROR, _rethrown_exception.GetMessage());
     }
     Catch(InvalidArgumentException)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::INVALID_VALUES_ERROR, _rethrown_exception.GetMessage());
     }
     Catch(ConversionException)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, _rethrown_exception.GetMessage());
     }
     Catch (NotFoundException)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::NOT_FOUND_ERROR, _rethrown_exception.GetMessage());
     }
     Catch(Exception)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
@@ -290,10 +290,10 @@ JSValueRef JSCalendarManager::getUnifiedCalendar(JSContextRef context,
 
         if (dplEvent->getResult()) {
             if( dplEvent->getCalendar() ) {
-                               LogDebug("Successfully got a unified calendar.");
+                               LoggerD("Successfully got a unified calendar.");
                 return converter.toJSValueRefCalendar(dplEvent->getCalendar());
             } else {
-                LogError("Unified calendar not found.");
+                LoggerE("Unified calendar not found.");
             }
         } else {
             ThrowMsg(UnknownException, "Getting a unified calendar failed by unknown reason.");
@@ -301,27 +301,27 @@ JSValueRef JSCalendarManager::getUnifiedCalendar(JSContextRef context,
     }
     Catch(UnsupportedException)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::NOT_SUPPORTED_ERROR, _rethrown_exception.GetMessage());
     }
     Catch(InvalidArgumentException)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::INVALID_VALUES_ERROR, _rethrown_exception.GetMessage());
     }
     Catch(ConversionException)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, _rethrown_exception.GetMessage());
     }
     Catch (NotFoundException)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::NOT_FOUND_ERROR, _rethrown_exception.GetMessage());
     }
     Catch(Exception)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
@@ -385,27 +385,27 @@ JSValueRef JSCalendarManager::getCalendar(JSContextRef context,
     }
     Catch(UnsupportedException)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::NOT_SUPPORTED_ERROR, _rethrown_exception.GetMessage());
     }
     Catch(InvalidArgumentException)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::INVALID_VALUES_ERROR, _rethrown_exception.GetMessage());
     }
     Catch(ConversionException)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, _rethrown_exception.GetMessage());
     }
     Catch (NotFoundException)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::NOT_FOUND_ERROR, _rethrown_exception.GetMessage());
     }
     Catch(Exception)
     {
-               LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+               LoggerW("Exception: "<<_rethrown_exception.GetMessage());
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 }