Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision fc71bc10

Von Christian Ehringfeld vor etwa 9 Jahren hinzugefügt

  • ID fc71bc10ab956c67bc15f31a26a86addf9e4c3c2
  • Vorgänger 12a65aab
  • Nachfolger a66d2871

error msgs improved

Unterschiede anzeigen:

src/database.cpp
}
bool Database::rollbackTransaction() {
qDebug() << "Transaction rolled back!" << this->database.lastError().text();
qWarning() << "Transaction rolled back!" << this->database.lastError().text();
return supportTransactions && this->database.rollback();
}
src/entityinstancefactory.cpp
prop.write(e, iterator.value());
}
} else {
qDebug() << prop.name() << "on Entity" << EntityHelper::getClassname(
qWarning() << prop.name() << "on Entity" << EntityHelper::getClassname(
e) << "not writeable!";
}
}
src/entitymanager.cpp
const QSharedPointer<Entity> &relatedEntity) {
bool propertyIsValid = prop.isValid() && prop.isReadable() && prop.isWritable();
if (!propertyIsValid) {
qDebug() << "Relation is incomplete:" << r.getPropertyName();
qDebug() << "Involved entities: " << EntityHelper::getClassName(
qWarning() << "Relation is incomplete:" << r.getPropertyName();
qWarning() << "Involved entities: " << EntityHelper::getClassName(
e.data()) <<
"(MainEntitiy) and " << EntityHelper::getClassName(relatedEntity.data());
}
......
void EntityManager::missingManyToManyTable(const QString &tblName,
const QSharedPointer<Entity> &e, const Relation &r) {
qDebug() << "MANY_TO_MANY Table " << tblName << " is missing";
qDebug() << "Entity " << EntityHelper::getClassName(e.data()) << " is affected";
qDebug() << "Relation of property: " << r.getPropertyName();
qWarning() << "MANY_TO_MANY Table " << tblName << " is missing";
qWarning() << "Entity " << EntityHelper::getClassName(e.data()) << " is affected";
qWarning() << "Relation of property: " << r.getPropertyName();
/**
@todo wait for Qt 5.5.1
@see https://codereview.qt-project.org/#/c/122232/
......
}
rc = this->db->exec(query);
if (!rc) {
qDebug() << "class is erroneous:" << EntityHelper::getClassname(entity.data());
qWarning() << "class is erroneous:" << EntityHelper::getClassname(entity.data());
break;
}
if (first) {
src/logger.cpp
QTextStream stream(&log);
const QString errorMsg = this->generateLogMsg(q.lastError());
if (!errorMsg.isEmpty()) {
qDebug() << errorMsg;
qWarning() << errorMsg;
stream << errorMsg;
}
if (logQuery || !errorMsg.isEmpty()) {
const QString query = this->generateLogMsg(q);
if (!query.isEmpty()) {
if(errorMsg.isEmpty()) {
qDebug() << query;
} else{
qWarning << query;
}
stream << query;
}
}
src/querybuilder.cpp
if (entity) {
return this->generateColumnNameID(entity->getTablename());
}
qDebug() << "Entity is empty!";
qWarning() << "Entity is empty!";
return "";
}
......
this->saveAttributes(entity, this->processProperties(e, usedProperties),
this->processRelations(e, usedRelations)), e->getPrimaryKey()));
} else {
qDebug() << "Instance of " << metaObj->className() << " could not be created";
qWarning() << "Instance of " << metaObj->className() << " could not be created";
break;
}
}
src/relation.cpp
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "relation.h"
#include <QDebug>
using namespace CuteEntityManager;
Relation::Relation() {

Auch abrufbar als: Unified diff