C++ (Qt) try { // Parse the person array to the Json-content QJsonDocument content; parsePersonsToContent( persons, content ); } catch ( const LogicError &e ) { std::cerr << e.what( ) << std::endl; return 1; } catch ( ... ) { std::cerr << "Error: unknown exception" << std::endl; return 1; }