SysTry -> SysSecureTry
[platform/framework/native/vision.git] / src / FUixVisionImageFeatureManager.cpp
index e71bafb..7b8eea4 100644 (file)
@@ -46,7 +46,7 @@ ImageFeatureManager::Construct(void)
             "Calling Construct() twice or more on a same instance is not allowed for this class.");
 
     std::unique_ptr<_ImageFeatureManagerImpl> pImageFeatureManagerImpl (new (std::nothrow) _ImageFeatureManagerImpl());
-    SysTryReturn(NID_UIX, pImageFeatureManagerImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+    SysSecureTryReturn(NID_UIX, pImageFeatureManagerImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
 
     __pImageFeatureManagerImpl = pImageFeatureManagerImpl.release();
     __pImageFeatureManagerImpl->InitDB();
@@ -58,7 +58,7 @@ ImageFeatureManager::DeleteFeature(int featureIndex)
 {
     SysAssertf(__pImageFeatureManagerImpl != null, "Not yet constructed! Consruct() should be called before use.");
 
-    SysTryReturn(NID_UIX, featureIndex >= 0, E_FAILURE, E_INVALID_ARG,
+    SysSecureTryReturn(NID_UIX, featureIndex >= 0, E_FAILURE, E_INVALID_ARG,
             "index should be greater than 0. [E_INVALID_ARG]");
 
     return __pImageFeatureManagerImpl->DeleteFeature(featureIndex) ? E_SUCCESS : E_FAILURE;
@@ -75,7 +75,7 @@ result
 ImageFeatureManager::DeleteAllFeatures(void)
 {
     SysAssertf(__pImageFeatureManagerImpl != null, "Not yet constructed! Consruct() should be called before use.");
-    SysTryReturnResult(NID_UIX, __pImageFeatureManagerImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY]");
+    SysSecureTryReturnResult(NID_UIX, __pImageFeatureManagerImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY]");
     __pImageFeatureManagerImpl->ReleaseDB();
     __pImageFeatureManagerImpl->InitDB();
     return E_SUCCESS;
@@ -87,12 +87,12 @@ ImageFeatureManager::AddFeature(const Tizen::Base::ByteBuffer& imageBuffer, int
 
     SysAssertf(__pImageFeatureManagerImpl != null, "Not yet constructed! Consruct() should be called before use.");
 
-    SysTryReturn(NID_UIX, width > 0 && height > 0, -1, E_INVALID_ARG,
+    SysSecureTryReturn(NID_UIX, width > 0 && height > 0, -1, E_INVALID_ARG,
             "Width and height must me more than 0. [E_INVALID_ARG]");
 
     const unsigned char* image = (unsigned char*) imageBuffer.GetPointer();
 
-    SysTryReturn(NID_UIX, image != null, -1, E_INVALID_ARG,
+    SysSecureTryReturn(NID_UIX, image != null, -1, E_INVALID_ARG,
             "image pointer must not be null. [E_INVALID_ARG]");
 
     return (int) __pImageFeatureManagerImpl->AddFeature(image, width, height, descr);
@@ -103,18 +103,18 @@ ImageFeatureManager::AddFeature(const Tizen::Base::String& imagePath)
 {
     SysAssertf(__pImageFeatureManagerImpl != null, "Not yet constructed! Consruct() should be called before use.");
 
-    SysTryReturn(NID_UIX, !imagePath.IsEmpty(), -1, E_INVALID_ARG,
+    SysSecureTryReturn(NID_UIX, !imagePath.IsEmpty(), -1, E_INVALID_ARG,
             "image path must not be empty. [E_INVALID_ARG]");
 
-    SysTryReturn(NID_UIX, Tizen::Io::File::IsFileExist(imagePath), -1, E_INVALID_ARG,
+    SysSecureTryReturn(NID_UIX, Tizen::Io::File::IsFileExist(imagePath), -1, E_INVALID_ARG,
                 "image path must exist. [E_INVALID_ARG]");
 
        Tizen::Io::FileAttributes _fileAtt;
 
-       SysTryReturn(NID_UIX, Tizen::Io::File::GetAttributes(imagePath, _fileAtt) == E_SUCCESS, -1, E_INVALID_ARG,
+       SysSecureTryReturn(NID_UIX, Tizen::Io::File::GetAttributes(imagePath, _fileAtt) == E_SUCCESS, -1, E_INVALID_ARG,
                        "image file must have attributes. [E_INVALID_ARG]");
 
-       SysTryReturn(NID_UIX, !_fileAtt.IsDirectory(), -1, E_INVALID_ARG,
+       SysSecureTryReturn(NID_UIX, !_fileAtt.IsDirectory(), -1, E_INVALID_ARG,
                        "image file must exist. [E_INVALID_ARG]");
 
     return (int) __pImageFeatureManagerImpl->AddFeature(imagePath);
@@ -133,18 +133,18 @@ ImageFeatureManager::Load(const Tizen::Base::String& featureSetFilePath)
 {
     SysAssertf(__pImageFeatureManagerImpl != null, "Not yet constructed! Consruct() should be called before use.");
 
-    SysTryReturnResult(NID_UIX, !featureSetFilePath.IsEmpty(), E_INVALID_ARG,
+    SysSecureTryReturnResult(NID_UIX, !featureSetFilePath.IsEmpty(), E_INVALID_ARG,
             "feature set path must not be empty. [E_INVALID_ARG]");
 
-    SysTryReturnResult(NID_UIX, Tizen::Io::File::IsFileExist(featureSetFilePath), E_INVALID_ARG,
+    SysSecureTryReturnResult(NID_UIX, Tizen::Io::File::IsFileExist(featureSetFilePath), E_INVALID_ARG,
             "feature set path must exist. [E_INVALID_ARG]");
 
        Tizen::Io::FileAttributes _fileAtt;
 
-    SysTryReturnResult(NID_UIX, Tizen::Io::File::GetAttributes(featureSetFilePath, _fileAtt) == E_SUCCESS, E_INVALID_ARG,
+    SysSecureTryReturnResult(NID_UIX, Tizen::Io::File::GetAttributes(featureSetFilePath, _fileAtt) == E_SUCCESS, E_INVALID_ARG,
             "feature set file must have attributes. [E_INVALID_ARG]");
 
-    SysTryReturnResult(NID_UIX, !_fileAtt.IsDirectory(), E_INVALID_ARG,
+    SysSecureTryReturnResult(NID_UIX, !_fileAtt.IsDirectory(), E_INVALID_ARG,
             "feature set file must exist. [E_INVALID_ARG]");
 
     return __pImageFeatureManagerImpl->OpenDB(featureSetFilePath) ? E_SUCCESS : E_FAILURE;
@@ -154,7 +154,7 @@ Tizen::Base::Collection::IListT<Tizen::Media::ImageFormat>*
 ImageFeatureManager::GetSupportedImageFileFormatsListN(void)
 {
     std::unique_ptr<Tizen::Base::Collection::ArrayListT<Tizen::Media::ImageFormat> > pFormatList(new (std::nothrow) Tizen::Base::Collection::ArrayListT<Tizen::Media::ImageFormat>);
-    SysTryReturn(NID_UIX, pFormatList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+    SysSecureTryReturn(NID_UIX, pFormatList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
 
     pFormatList->Add(Tizen::Media::IMG_FORMAT_BMP);
     pFormatList->Add(Tizen::Media::IMG_FORMAT_JPG);