catch exceptions upon startup
This commit is contained in:
parent
d7d833dd13
commit
e95886f327
1 changed files with 47 additions and 40 deletions
|
@ -36,10 +36,11 @@ int main( int argc, char **argv )
|
||||||
using mapnik::datasource_cache;
|
using mapnik::datasource_cache;
|
||||||
using mapnik::freetype_engine;
|
using mapnik::freetype_engine;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
QCoreApplication::setOrganizationName("Mapnik");
|
QCoreApplication::setOrganizationName("Mapnik");
|
||||||
QCoreApplication::setOrganizationDomain("mapnik.org");
|
QCoreApplication::setOrganizationDomain("mapnik.org");
|
||||||
QCoreApplication::setApplicationName("Viewer");
|
QCoreApplication::setApplicationName("Viewer");
|
||||||
|
|
||||||
QSettings settings("viewer.ini",QSettings::IniFormat);
|
QSettings settings("viewer.ini",QSettings::IniFormat);
|
||||||
|
|
||||||
// register input plug-ins
|
// register input plug-ins
|
||||||
|
@ -85,3 +86,9 @@ int main( int argc, char **argv )
|
||||||
}
|
}
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
catch (std::exception const& ex)
|
||||||
|
{
|
||||||
|
std::cerr << "Could not start viewer: '" << ex.what() << "'\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue