mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 10:46:04 +03:00
Properly handle exceptions when create torrent
Closes #15518. PR #15532.
This commit is contained in:
parent
338d9a0848
commit
ac5c264e66
1 changed files with 6 additions and 2 deletions
|
@ -224,9 +224,13 @@ void TorrentCreatorThread::run()
|
|||
emit updateProgress(100);
|
||||
emit creationSuccess(m_params.savePath, parentPath);
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
catch (const RuntimeError &err)
|
||||
{
|
||||
emit creationFailure(e.what());
|
||||
emit creationFailure(tr("Create new torrent file failed. Reason: %1.").arg(err.message()));
|
||||
}
|
||||
catch (const std::exception &err)
|
||||
{
|
||||
emit creationFailure(tr("Create new torrent file failed. Reason: %1.").arg(QString::fromLocal8Bit(err.what())));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue