Ref T149, indentify PHP error string

This commit is contained in:
Klaus Basan
2017-09-17 18:09:20 +02:00
committed by Mathew Sutcliffe
parent 815cf75f66
commit db05d237c2
2 changed files with 10 additions and 0 deletions

View File

@@ -356,6 +356,13 @@ namespace BlackMisc
return phpError.remove(regEx);
}
bool CNetworkUtils::looksLikePhpErrorMessage(const QString &errorMessage)
{
if (errorMessage.length() < 50) { return false; }
if (errorMessage.contains("xdebug", Qt::CaseInsensitive)) { return true; }
return false;
}
CStatusMessageList CNetworkUtils::createNetworkReport(const QNetworkAccessManager *am)
{
return CNetworkUtils::createNetworkReport(CUrl(), am);

View File

@@ -146,6 +146,9 @@ namespace BlackMisc
//! Remove the HTML formatting from a PHP error message
static QString removeHtmlPartsFromPhpErrorMessage(const QString &errorMessage);
//! Looks like PHP error messages
static bool looksLikePhpErrorMessage(const QString &errorMessage);
//! Status about network
static BlackMisc::CStatusMessageList createNetworkReport(const QNetworkAccessManager *am);