* @brief Implementation of the JSContactRef class
*/
-#include <dpl/log/log.h>
#include <dpl/shared_ptr.h>
#include <CommonsJavaScript/Validator.h>
#include <JSTizenExceptionFactory.h>
#include <JSTizenException.h>
#include "ContactConverter.h"
#include "JSContactRef.h"
+#include <Logger.h>
#define CONTACT_CLASS_NAME "ContactRef"
#define CONTACT_PROP_ATTR_ADDRESS_BOOK_ID "addressBookId"
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");
JSContactRefPriv *priv = static_cast<JSContactRefPriv*>(JSObjectGetPrivate(constructor));
if (!priv) {
ThrowMsg(InvalidArgumentException, "2nd argument must be contact id");
} Catch(Exception ) {
- LogError("Argument type mismatch : " << _rethrown_exception.GetMessage());
+ LoggerE("Argument type mismatch : " << _rethrown_exception.GetMessage());
*exception = JSTizenExceptionFactory::makeErrorObject(context, JSTizenException::INVALID_VALUES_ERROR, "Wrong arguments");
return NULL;
}
Try {
addressBookId = converter->toString(arguments[0]);
} 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;
}
Try {
contactId = converter->toString(arguments[1]);
} 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;
}
Try {
jsobject = createJSObject(gContext, contactRef);
} 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");
}
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");