mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Handle exception when torrent file cannot be exported
Both `lt::create_torrent` constructor and `lt::create_torrent::generate()` can throw an exception so we need to handle it to prevent the app from crashing.
This commit is contained in:
parent
6070b41c9b
commit
3faa7226e7
7 changed files with 66 additions and 41 deletions
|
@ -2321,7 +2321,7 @@ void Session::exportTorrentFile(const Torrent *torrent, TorrentExportFolder fold
|
|||
}
|
||||
catch (const RuntimeError &err)
|
||||
{
|
||||
LogMsg(tr("Couldn't export torrent metadata file '%1'. Reason: %2")
|
||||
LogMsg(tr("Couldn't export torrent metadata file '%1'. Reason: %2.")
|
||||
.arg(newTorrentPath, err.message()), Log::WARNING);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue