Update change log and spec for wrt-plugins-tizen_0.4.27
[framework/web/wrt-plugins-tizen.git] / src / Calendar / CalendarConverter.cpp
index eb02ba8..d53c23b 100755 (executable)
@@ -904,8 +904,12 @@ CalendarEventPtr CalendarConverter::toItem(const JSValueRef value, bool updateMo
     }
 
     if (!JSValueIsUndefined(m_context, geolocationData) && !JSValueIsNull(m_context, geolocationData)) {
-        DeviceAPI::Tizen::SimpleCoordinatesPtr geoLocation = DeviceAPI::Tizen::JSSimpleCoordinates::getSimpleCoordinates(m_context, geolocationData);
-        result->setGeolocation(geoLocation);
+           Try {
+               DeviceAPI::Tizen::SimpleCoordinatesPtr geoLocation = DeviceAPI::Tizen::JSSimpleCoordinates::getSimpleCoordinates(m_context, geolocationData);
+               result->setGeolocation(geoLocation);
+       } Catch(InvalidArgumentException) {
+               ThrowMsg(ConversionException, "Wrong geolocation type.");
+               }
     }
 
     if (!JSValueIsUndefined(m_context, visibilityData)) {