Changeset 81e085d


Ignore:
Timestamp:
08/27/17 22:58:18 (5 years ago)
Author:
gregor herrmann <gregor@…>
Branches:
master, qt5
Children:
330b8cb
Parents:
5def683
Message:

TrackInsertException?: make error message useful.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/track.cpp

    r5def683 r81e085d  
    4040{
    4141    QSqlQuery query;
    42     query.prepare("INSERT INTO " + sTableName + " (" + CONFERENCEID + "," + NAME + ")" + " VALUES " + "(\"" + QString::number(conferenceid()) + "\",\"" + name() + "\")");
     42    QString trackname = name();
     43    query.prepare("INSERT INTO " + sTableName + " (" + CONFERENCEID + "," + NAME + ")" + " VALUES " + "(\"" + QString::number(conferenceid()) + "\",\"" + trackname + "\")");
    4344    if (!query.exec())
    4445    {
    45         throw TrackInsertException("Exec Error");
     46        throw TrackInsertException("Inserting track '" + trackname + "' into database failed.");
    4647    }
    4748    QVariant variant = query.lastInsertId();
Note: See TracChangeset for help on using the changeset viewer.