Kaydet (Commit) 6abcd7fe authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1247641 Uncaught exception

Change-Id: I35e1eed91a23d2b993398fb39e47e21ca9c0a055
üst 70d810fa
......@@ -44,6 +44,8 @@ static bool findAndSelect(JavaInfo**);
SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
{
try
{
if( hasOption("--help",argc, argv) || hasOption("-h", argc, argv))
{
fprintf(stdout, HELP_TEXT);// default
......@@ -63,18 +65,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
return -1;
}
JavaInfo * pInfo = NULL;
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)
{
......@@ -107,6 +99,12 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
OString sPaths = getLD_LIBRARY_PATH(pInfo->arVendorData);
fprintf(stdout, "%s\n", sPaths.getStr());
jfw_freeJavaInfo(pInfo);
}
catch (const std::exception&)
{
fprintf(stderr,"javaldx failed!\n");
return -1;
}
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment