Browse Source

In qbtsession.cpp exception made caught by reference

adaptive-webui-19844
Konstantin Goncharik 11 years ago
parent
commit
a2b3ad7958
  1. 8
      src/qtlibtorrent/qbtsession.cpp

8
src/qtlibtorrent/qbtsession.cpp

@ -964,7 +964,7 @@ QTorrentHandle QBtSession::addMagnetUri(QString magnet_uri, bool resumed, bool f @@ -964,7 +964,7 @@ QTorrentHandle QBtSession::addMagnetUri(QString magnet_uri, bool resumed, bool f
// Adding torrent to Bittorrent session
try {
h = QTorrentHandle(s->add_torrent(p));
}catch(std::exception e) {
}catch(std::exception &e) {
qDebug("Error: %s", e.what());
}
// Check if it worked
@ -1153,7 +1153,7 @@ QTorrentHandle QBtSession::addTorrent(QString path, bool fromScanDir, QString fr @@ -1153,7 +1153,7 @@ QTorrentHandle QBtSession::addTorrent(QString path, bool fromScanDir, QString fr
// Adding torrent to Bittorrent session
try {
h = QTorrentHandle(s->add_torrent(p));
}catch(std::exception e) {
}catch(std::exception &e) {
qDebug("Error: %s", e.what());
}
// Check if it worked
@ -1539,7 +1539,7 @@ bool QBtSession::enableDHT(bool b) { @@ -1539,7 +1539,7 @@ bool QBtSession::enableDHT(bool b) {
s->add_dht_router(std::make_pair(std::string("dht.aelitis.com"), 6881)); // Vuze
DHTEnabled = true;
qDebug("DHT enabled");
}catch(std::exception e) {
}catch(std::exception &e) {
qDebug("Could not enable DHT, reason: %s", e.what());
return false;
}
@ -1594,7 +1594,7 @@ void QBtSession::saveTempFastResumeData() { @@ -1594,7 +1594,7 @@ void QBtSession::saveTempFastResumeData() {
if (h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking || h.has_error()) continue;
qDebug("Saving fastresume data for %s", qPrintable(h.name()));
h.save_resume_data();
}catch(std::exception e) {}
}catch(std::exception &e) {}
}
}

Loading…
Cancel
Save