Esempio n. 1
0
void PhaseTest :: check(Entity* e){
    error(!message().equal(myM));
    if(inError()){
        LOG_TS(LOG_ERROR, "Invalid message return from " + e->name()
                + " -- Expecting : " + myM.printVersion()
                + " -- Receive : " + message().printVersion());
        e->clearFlux();
        nbError+=1;
    }
}
Esempio n. 2
0
void PhaseTest :: handler(size_t pos, Entity* e){
    //    Log::receive(e->fdIn(), "Phase Test", e->name().c_str(), message());
    Tool::unused(pos);
    check(e);
    if(inError()){
        finish();
    }else if((message().length() < NB_TEST)){
        nextTest ();
        sendToBot(target);
    }else{
        finish();
    }
}
Esempio n. 3
0
bool DirtyListExecutor::sendRequest(const QString& Method, const QString& URL, const QString& Data, QString& Rcv)
{
    if (inError())
        return false;

    QMessageBox::StandardButton theChoice = QMessageBox::Retry;
    while (theChoice == QMessageBox::Retry) {
        QUrl theUrl(Web+URL);
        if (!theDownloader->request(Method,theUrl,Data))
        {
            qDebug() << QString("Upload error: request (%1); Server message is '%2'").arg(theDownloader->resultCode()).arg(theDownloader->resultText());
            if (theDownloader->resultCode() == 401) {
                QMessageBox::warning(Progress,tr("Error uploading request"),
                    tr("Please check your username and password in the Preferences menu"));
                theChoice = QMessageBox::Abort;
            } else {
                QString msg = tr("There was an error uploading this request (%1)\nServer message is '%2'").arg(theDownloader->resultCode()).arg(theDownloader->resultText());
                if (!theDownloader->errorText().isEmpty())
                    msg += tr("\nAPI message is '%1'").arg(theDownloader->errorText());
                theChoice = QMessageBox::warning(Progress,tr("Error uploading request"), msg, QMessageBox::Abort | QMessageBox::Retry | QMessageBox::Ignore);
                continue;
            }
        }

        QByteArray Content = theDownloader->content();
        int x = theDownloader->resultCode();

        if (x==200)
        {
            Rcv = QString::fromUtf8(Content.data());
            break;
        }
        else
        {
            qDebug() << QString("Upload error: request (%1); Server message is '%2'").arg(theDownloader->resultCode()).arg(theDownloader->resultText());
            theChoice = QMessageBox::warning(Progress,tr("Error uploading request"),
                            tr("There was an error uploading this request (%1)\nServer message is '%2'").arg(x).arg(theDownloader->resultText()),
                            QMessageBox::Abort | QMessageBox::Retry | QMessageBox::Ignore);
            continue;
        }
    }
    if (theChoice == QMessageBox::Abort) {
        errorAbort = true;
        return false;
    }
    return true;
}
void TextModelLavaan::apply()
{
	//checkEverything();
	if (_boundTo != NULL && inError() == false)
		_boundTo->setValue(fq(this->toPlainText()));
}