mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Show error message when Session failed to start
This commit is contained in:
@@ -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.")};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user