Add clarifying message on exception

This commit is contained in:
Senthil 2016-03-30 10:46:17 -07:00
parent 8ea93db89d
commit 863d3d9766
2 changed files with 6 additions and 4 deletions

View file

@ -103,9 +103,10 @@ pal::string_t fx_muxer_t::resolve_cli_version(const pal::string_t& global_json)
} }
retval = ver_iter->second.as_string(); retval = ver_iter->second.as_string();
} }
catch (...) catch (const web::json::json_exception& je)
{ {
trace::error(_X("A JSON parsing exception occurred")); pal::string_t jes = pal::to_palstring(je.what());
trace::error(_X("A JSON parsing exception occurred: %s"), jes.c_str());
} }
trace::verbose(_X("CLI version is [%s] in global json file [%s]"), retval.c_str(), global_json.c_str()); trace::verbose(_X("CLI version is [%s] in global json file [%s]"), retval.c_str(), global_json.c_str());
return retval; return retval;

View file

@ -86,9 +86,10 @@ bool runtime_config_t::ensure_parsed()
parse_opts(iter->second); parse_opts(iter->second);
} }
} }
catch (...) catch (const web::json::json_exception& je)
{ {
trace::warning(_X("Json exception occurred.")); pal::string_t jes = pal::to_palstring(je.what());
trace::error(_X("A JSON parsing exception occurred: %s"), jes.c_str());
return false; return false;
} }
return true; return true;