From ff3eb34fc1b3c9066ffd8a85619ee73172e0dd61 Mon Sep 17 00:00:00 2001 From: IceArmy Date: Sat, 18 Jun 2011 00:27:59 -0700 Subject: [PATCH] Maintain consistency across error messages --- src/csconverter.cpp | 2 +- src/phantom.cpp | 4 ++-- src/utils.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/csconverter.cpp b/src/csconverter.cpp index bc168046..f4b93478 100644 --- a/src/csconverter.cpp +++ b/src/csconverter.cpp @@ -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()); diff --git a/src/phantom.cpp b/src/phantom.cpp index 35a965ad..5906d1cd 100644 --- a/src/phantom.cpp +++ b/src/phantom.cpp @@ -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); diff --git a/src/utils.cpp b/src/utils.cpp index cf7a0c81..b7ec1ad1 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -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;