//
#include "JSWebAPIError.h"
-
-#include <dpl/log/log.h>
-
#include <CommonsJavaScript/Converter.h>
#include <CommonsJavaScript/JSUtils.h>
#include <string>
+#include "Logger.h"
namespace DeviceAPI {
namespace Common {
JSValueRef JSWebAPIError::getStaticProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* /*exception*/) {
PrivateObject* privateObject = static_cast<PrivateObject*> (JSObjectGetPrivate(object));
if (!privateObject) {
- LogError("Private object is not set.");
+ LoggerE("Private object is not set.");
return JSValueMakeUndefined(context);
}
WrtDeviceApis::CommonsJavaScript::Converter converter(context);
try {
if (JSStringIsEqualToUTF8CString(propertyName, PROPERTY_CODE)) {
- LogDebug("propertyName PROPERTY_CODE");
+ LoggerD("propertyName PROPERTY_CODE");
return converter.toJSValueRef(privateObject->getObject()->getCode());
} else if (JSStringIsEqualToUTF8CString(propertyName, PROPERTY_NAME)) {
return converter.toJSValueRef(privateObject->getObject()->getName());
}else if (JSStringIsEqualToUTF8CString(propertyName, PROPERTY_DATA_CLONE_ERR)) {
return converter.toJSValueRef(DATA_CLONE_ERR);
}else{
- LogDebug("propertyName not supported");
+ LoggerD("propertyName not supported");
return converter.toJSValueRef(UNKNOWN_ERR);
}
} catch (const WrtDeviceApis::Commons::ConversionException& ex) {
- LogError("Exception: " << ex.GetMessage());
+ LoggerE("Exception: " << ex.GetMessage());
}
return JSValueMakeUndefined(context);
}
int JSWebAPIError::convertToWebAPIErrorCode(const std::string& errorName){
- LogDebug("<<< errorName:[" << errorName << "]");
+ LoggerD("<<< errorName:[" << errorName << "]");
int retErrorCode = -1;
retErrorCode = UNKNOWN_ERR;
}
- LogDebug(">>> retERrorCode:" << retErrorCode );
+ LoggerD(">>> retERrorCode:" << retErrorCode );
return retErrorCode;
}