Do not crash when the command line option is unknown.

http://code.google.com/p/phantomjs/issues/detail?id=124
1.2
Ariya Hidayat 2011-06-17 18:37:01 -07:00
parent 75bbbebb89
commit 944afb314e
1 changed files with 2 additions and 2 deletions

View File

@ -118,8 +118,8 @@ Phantom::Phantom(QObject *parent)
continue;
}
if (arg.startsWith("--")) {
qFatal("Unknown option '%s'", qPrintable(arg));
exit(-1);
std::cerr << "Unknown option '" << qPrintable(arg) << "'" << std::endl;
m_terminated = true;
return;
} else {
m_scriptFile = arg;