pfi/pficommon — pull request #7 by pepshiso (2011-11-28 17:10:56+00:00)
Title: Solved the pficommon.json's bad_cast problem.

json_cast and other functions throw json_bad_cast instead of bad_cast.

try {
json_cast(j);
} catch (json_bad_cast& e) {
// ...
}

json_bad_cast is derived from bad_cast, so the modification does not break existing codes.

try {
json_cast(j);
} catch (std::bad_cast& e) {
// ...
}

You can also use json_bad_cast_any instead of json_bad_cast for convenience.

try {
json_cast(j);
} catch (json_bad_cast_any& e) {
// ...
}