mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 01:03:08 -07:00
Show error message when Session failed to start
This commit is contained in:
parent
9e00f08ea6
commit
89deccd9b5
6 changed files with 41 additions and 36 deletions
|
@ -69,6 +69,7 @@
|
|||
#endif
|
||||
|
||||
#include "base/algorithm.h"
|
||||
#include "base/exceptions.h"
|
||||
#include "base/global.h"
|
||||
#include "base/logger.h"
|
||||
#include "base/net/downloadhandler.h"
|
||||
|
@ -3797,11 +3798,11 @@ void Session::initResumeFolder()
|
|||
if (resumeFolderDir.exists() || resumeFolderDir.mkpath(resumeFolderDir.absolutePath())) {
|
||||
m_resumeFolderLock.setFileName(resumeFolderDir.absoluteFilePath("session.lock"));
|
||||
if (!m_resumeFolderLock.open(QFile::WriteOnly)) {
|
||||
throw std::runtime_error("Cannot write to torrent resume folder.");
|
||||
throw RuntimeError {tr("Cannot write to torrent resume folder.")};
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw std::runtime_error("Cannot create torrent resume folder.");
|
||||
throw RuntimeError {tr("Cannot create torrent resume folder.")};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue