Maintain consistency across error messages

1.2
IceArmy 2011-06-18 00:27:59 -07:00
parent 6e2b362850
commit ff3eb34fc1
3 changed files with 5 additions and 5 deletions

View File

@ -40,7 +40,7 @@ CSConverter::CSConverter(QObject *parent)
{
QFile file(":/coffee-script.js");
if (!file.open(QFile::ReadOnly)) {
qFatal("CoffeeScript compiler is not available!");
std::cerr << "CoffeeScript compiler is not available!" << std::endl;
exit(1);
}
QString script = QString::fromUtf8(file.readAll());

View File

@ -164,13 +164,13 @@ Phantom::Phantom(QObject *parent)
QFile file(":/bootstrap.js");
if (!file.open(QFile::ReadOnly)) {
qCritical() << "Can not bootstrap!";
std::cerr << "Can not bootstrap!" << std::endl;
exit(1);
}
QString bootstrapper = QString::fromUtf8(file.readAll());
file.close();
if (bootstrapper.isEmpty()) {
qCritical() << "Can not bootstrap!";
std::cerr << "Can not bootstrap!" << std::endl;
exit(1);
}
m_page->mainFrame()->evaluateJavaScript(bootstrapper);

View File

@ -42,7 +42,7 @@ void Utils::showUsage()
QFile file;
file.setFileName(":/usage.txt");
if ( !file.open(QFile::ReadOnly) ) {
qFatal("Unable to print the usage message");
std::cerr << "Unable to print the usage message" << std::endl;
exit(1);
}
std::cout << qPrintable(QString::fromUtf8(file.readAll()));
@ -107,7 +107,7 @@ bool Utils::injectJsInFrame(const QString &jsFilePath, const QString &libraryPat
jsFile.close();
return true;
} else {
std::cerr << "Can't open '" << qPrintable(jsFilePath) << "'" << std::endl << std::endl;
qWarning() << "Can't open '" << qPrintable(jsFilePath) << "'";
}
}
return false;