Add missing exception handling 64/301264/3
authorChanggyu Choi <changyu.choi@samsung.com>
Mon, 13 Nov 2023 06:23:29 +0000 (15:23 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Mon, 13 Nov 2023 06:48:10 +0000 (15:48 +0900)
Change-Id: I531ecb00027485697953fd52fef23c7240f7e695
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
src/lib/api/amd_api_database.cc

index 548b431..b7d8dcc 100644 (file)
@@ -146,9 +146,9 @@ class DBManager {
         auto cursor = std::make_unique<Cursor>(std::move(db), std::move(query),
             std::move(bind_text));
         return cb(cursor.get(), user_data);
-      } catch (const amd::Exception& e) {
-        _E("Exception(%d) occurs", e.GetErrorCode());
-        return e.GetErrorCode();
+      } catch (const tizen_base::DbException& e) {
+        _E("Exception(%d) occurs: %s", e.code(), e.msg());
+        return -e.code();
       }
     }