catch exceptions upon startup

This commit is contained in:
Dane Springmeyer 2012-07-31 10:45:38 -07:00
parent d7d833dd13
commit e95886f327

View file

@ -36,10 +36,11 @@ int main( int argc, char **argv )
using mapnik::datasource_cache;
using mapnik::freetype_engine;
try
{
QCoreApplication::setOrganizationName("Mapnik");
QCoreApplication::setOrganizationDomain("mapnik.org");
QCoreApplication::setApplicationName("Viewer");
QSettings settings("viewer.ini",QSettings::IniFormat);
// register input plug-ins
@ -85,3 +86,9 @@ int main( int argc, char **argv )
}
return app.exec();
}
catch (std::exception const& ex)
{
std::cerr << "Could not start viewer: '" << ex.what() << "'\n";
return 1;
}
}