diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-30 10:45:49 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-30 14:34:25 +0000 |
commit | c7b0c02ddd1aecb65ca3c82831a4cc779c9c8767 (patch) | |
tree | 9a289abae3a1ce0370c701861e8ec9fd3718e8fe /jvmfwk | |
parent | 3bfd60a1dc138f1910529bd15043ec731525d572 (diff) |
coverity#1247641 Uncaught exception
Change-Id: I61e55095b4f74fd619a26cba88dd177d0e318154
Diffstat (limited to 'jvmfwk')
-rw-r--r-- | jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx index 8f5e5a249ffb..bec224ec614a 100644 --- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx +++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx @@ -65,7 +65,16 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) JavaInfo * pInfo = NULL; - errcode = jfw_getSelectedJRE( & pInfo); + + try + { + errcode = jfw_getSelectedJRE( & pInfo); + } + catch (const std::exception&) + { + fprintf(stderr,"javaldx failed!\n"); + return -1; + } if (errcode != JFW_E_NONE && errcode != JFW_E_INVALID_SETTINGS) { |