mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
In qbtsession.cpp exception made caught by reference
Conflicts: src/qtlibtorrent/qbtsession.cpp
This commit is contained in:
committed by
sledgehammer999
parent
7c1f712181
commit
1c38568f42
@@ -985,7 +985,7 @@ QTorrentHandle QBtSession::addMagnetUri(QString magnet_uri, bool resumed, bool f
|
|||||||
// Adding torrent to Bittorrent session
|
// Adding torrent to Bittorrent session
|
||||||
try {
|
try {
|
||||||
h = QTorrentHandle(add_magnet_uri(*s, magnet_uri.toStdString(), p));
|
h = QTorrentHandle(add_magnet_uri(*s, magnet_uri.toStdString(), p));
|
||||||
}catch(std::exception e) {
|
}catch(std::exception &e) {
|
||||||
qDebug("Error: %s", e.what());
|
qDebug("Error: %s", e.what());
|
||||||
}
|
}
|
||||||
// Check if it worked
|
// Check if it worked
|
||||||
@@ -1184,7 +1184,7 @@ QTorrentHandle QBtSession::addTorrent(QString path, bool fromScanDir, QString fr
|
|||||||
// Adding torrent to Bittorrent session
|
// Adding torrent to Bittorrent session
|
||||||
try {
|
try {
|
||||||
h = QTorrentHandle(s->add_torrent(p));
|
h = QTorrentHandle(s->add_torrent(p));
|
||||||
}catch(std::exception e) {
|
}catch(std::exception &e) {
|
||||||
qDebug("Error: %s", e.what());
|
qDebug("Error: %s", e.what());
|
||||||
}
|
}
|
||||||
// Check if it worked
|
// Check if it worked
|
||||||
@@ -1598,7 +1598,7 @@ bool QBtSession::enableDHT(bool b) {
|
|||||||
s->add_dht_router(std::make_pair(std::string("dht.aelitis.com"), 6881)); // Vuze
|
s->add_dht_router(std::make_pair(std::string("dht.aelitis.com"), 6881)); // Vuze
|
||||||
DHTEnabled = true;
|
DHTEnabled = true;
|
||||||
qDebug("DHT enabled");
|
qDebug("DHT enabled");
|
||||||
}catch(std::exception e) {
|
}catch(std::exception &e) {
|
||||||
qDebug("Could not enable DHT, reason: %s", e.what());
|
qDebug("Could not enable DHT, reason: %s", e.what());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1655,7 +1655,7 @@ void QBtSession::saveTempFastResumeData() {
|
|||||||
if (h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking || h.has_error()) continue;
|
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()));
|
qDebug("Saving fastresume data for %s", qPrintable(h.name()));
|
||||||
h.save_resume_data();
|
h.save_resume_data();
|
||||||
}catch(std::exception e) {}
|
}catch(std::exception &e) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user