OSDN Git Service

kget: change transfer status when unspecified exception is raised during transfer...
authorIvailo Monev <xakepa10@gmail.com>
Sat, 2 Oct 2021 20:08:12 +0000 (23:08 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Sat, 2 Oct 2021 20:08:12 +0000 (23:08 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
kget/transfer-plugins/torrent/transferTorrent.cpp

index 776577f..46816e3 100644 (file)
@@ -537,7 +537,10 @@ void TransferTorrent::start()
         setTransferChange(Transfer::Tc_Status | Transfer::Tc_Log, true);
         return;
     } catch (...) {
-        kWarning() << "exception raised";
+        const QString errormesssage = i18n("Exception raised");
+        setError(errormesssage, SmallIcon("dialog-error"), Job::NotSolveable);
+        setLog(errormesssage, Transfer::Log_Error);
+        setTransferChange(Transfer::Tc_Status | Transfer::Tc_Log, true);
         return;
     }