From 6ac8e7a464cc56190854121e3ec4e42363cadc9e Mon Sep 17 00:00:00 2001 From: selsta Date: Sun, 9 Apr 2023 03:00:42 +0200 Subject: p2pool: add more detailed failure message --- pages/Mining.qml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'pages') diff --git a/pages/Mining.qml b/pages/Mining.qml index 025f8b92..e0f220aa 100644 --- a/pages/Mining.qml +++ b/pages/Mining.qml @@ -641,10 +641,25 @@ allArgs = allArgs.filter( ( el ) => !defaultArgs.includes( el.split(" ")[0] ) ) } } - function p2poolDownloadFailed() { + function p2poolDownloadFailed(errorCode) { statusMessage.visible = false errorPopup.title = qsTr("P2Pool Installation Failed") + translationManager.emptyString; - errorPopup.text = qsTr("P2Pool installation failed.") + isWindows ? (" " + qsTr("Try starting the program with administrator privileges.")) : "" + switch (errorCode) { + case P2PoolManager.HashVerificationFailed: + errorPopup.text = qsTr("Hash verification failed.") + translationManager.emptyString; + break; + case P2PoolManager.BinaryNotAvailable: + errorPopup.text = qsTr("P2Pool download is not available.") + translationManager.emptyString; + break; + case P2PoolManager.ConnectionIssue: + errorPopup.text = qsTr("P2Pool download failed due to a connection issue.") + translationManager.emptyString; + break; + case P2PoolManager.InstallationFailed: + errorPopup.text = qsTr("P2Pool installation failed.") + (isWindows ? (" " + qsTr("Try starting the program with administrator privileges.")) : "") + break; + default: + errorPopup.text = qsTr("Unknown error.") + translationManager.emptyString; + } errorPopup.icon = StandardIcon.Critical errorPopup.open() update() -- cgit v1.2.3