mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +08:00
Ref T149, indentify PHP error string
This commit is contained in:
committed by
Mathew Sutcliffe
parent
815cf75f66
commit
db05d237c2
@@ -356,6 +356,13 @@ namespace BlackMisc
|
|||||||
return phpError.remove(regEx);
|
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)
|
CStatusMessageList CNetworkUtils::createNetworkReport(const QNetworkAccessManager *am)
|
||||||
{
|
{
|
||||||
return CNetworkUtils::createNetworkReport(CUrl(), am);
|
return CNetworkUtils::createNetworkReport(CUrl(), am);
|
||||||
|
|||||||
@@ -146,6 +146,9 @@ namespace BlackMisc
|
|||||||
//! Remove the HTML formatting from a PHP error message
|
//! Remove the HTML formatting from a PHP error message
|
||||||
static QString removeHtmlPartsFromPhpErrorMessage(const QString &errorMessage);
|
static QString removeHtmlPartsFromPhpErrorMessage(const QString &errorMessage);
|
||||||
|
|
||||||
|
//! Looks like PHP error messages
|
||||||
|
static bool looksLikePhpErrorMessage(const QString &errorMessage);
|
||||||
|
|
||||||
//! Status about network
|
//! Status about network
|
||||||
static BlackMisc::CStatusMessageList createNetworkReport(const QNetworkAccessManager *am);
|
static BlackMisc::CStatusMessageList createNetworkReport(const QNetworkAccessManager *am);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user