svace fix:add catch - std::out_of_range 98/213998/1 accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix accepted/tizen/5.5/unified/20191031.022427 accepted/tizen/5.5/unified/mobile/hotfix/20201027.090256 accepted/tizen/unified/20190918.102205 submit/tizen/20190917.065530 submit/tizen_5.5/20191031.000004 submit/tizen_5.5_mobile_hotfix/20201026.185104 tizen_5.5.m2_release
authorsanghyeok.oh <sanghyeok.oh@samsung.com>
Tue, 17 Sep 2019 06:40:43 +0000 (15:40 +0900)
committersanghyeok.oh <sanghyeok.oh@samsung.com>
Tue, 17 Sep 2019 06:41:37 +0000 (15:41 +0900)
Change-Id: I2bf65edb452d6d4baeeabc34682825e56ef69199
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
src/dbuspolicy_finder.cpp

index b4914c6..f22e4cd 100644 (file)
@@ -312,7 +312,7 @@ int bailOut(const std::string & error) {
 }
 
 void getToken(const std::string & long_name, std::string & interface, std::string & member, MessageType & type, std::string & serviceName,
-               gid_t & numberGroup, uid_t & numberUser, std::string & path) noexcept
+               gid_t & numberGroup, uid_t & numberUser, std::string & path)
 {
        std::string short_name = long_name;
 
@@ -445,6 +445,8 @@ int main(int argc, char *argv[]) {
                                getToken(str, interface, member, type, serviceName, numberGroup, numberUser, path);
                        } catch (std::invalid_argument & e) {
                                return bailOut(e.what());
+                       } catch (std::out_of_range & e) {
+                               return bailOut(e.what());
                        }
                        break;
                }