#include <JSTizenException.h>
#include "ContactConverter.h"
#include "JSContactAnniversary.h"
+#include <Logger.h>
#define FILTER_CLASS_NAME "Anniversary"
#define CONTACT_ATTR_DATE "date"
JSContactAnniversaryPriv *priv = new JSContactAnniversaryPriv(context, contactAnniversary);
JSObjectRef jsObjectRef = JSObjectMake(context, getClassRef(), static_cast<void*>(priv));
if (NULL == jsObjectRef) {
- LogError("object creation error");
+ LoggerE("object creation error");
return NULL;
}
return jsObjectRef;
const JSValueRef arguments[],
JSValueRef* exception)
{
- LogDebug("entered");
+ LoggerD("entered");
JSContactAnniversaryPriv *priv = static_cast<JSContactAnniversaryPriv*>(JSObjectGetPrivate(constructor));
if (!priv) {
date = converter->toDateTm(arguments[0]);
contactAnniversary->setDate(date);
} Catch(Exception) {
- LogError("Argument type mismatch : " << _rethrown_exception.GetMessage());
+ LoggerE("Argument type mismatch : " << _rethrown_exception.GetMessage());
*exception = JSTizenExceptionFactory::makeErrorObject(context, JSTizenException::TYPE_MISMATCH_ERROR, "1st argument must be a 'Date object'");
return NULL;
}
Try {
jsobject = createJSObject(gContext, contactAnniversary);
} Catch(Exception) {
- LogError("Argument type mismatch : " << _rethrown_exception.GetMessage());
+ LoggerE("Argument type mismatch : " << _rethrown_exception.GetMessage());
*exception = JSTizenExceptionFactory::makeErrorObject(context, JSTizenException::TYPE_MISMATCH_ERROR, "Wrong arguments");
return NULL;
}
}
Catch(WrtDeviceApis::Commons::Exception)
{
- LogWarning("trying to get incorrect value");
+ LoggerW("trying to get incorrect value");
}
return JSValueMakeUndefined(context);
}
}
Catch(WrtDeviceApis::Commons::Exception)
{
- LogWarning("trying to set incorrect value");
+ LoggerW("trying to set incorrect value");
JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type mismatch");
}
return true;
}
Catch(WrtDeviceApis::Commons::Exception)
{
- LogWarning("trying to get incorrect value");
+ LoggerW("trying to get incorrect value");
}
return JSValueMakeUndefined(context);
}
}
Catch(WrtDeviceApis::Commons::Exception)
{
- LogWarning("trying to set incorrect value");
+ LoggerW("trying to set incorrect value");
JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type mismatch");
}
return true;