There is a bounty for this from a DRGX user for 600 DRGX/600 HUSH. They would like just the actual error message displayed instead of the entire stderr from hushd.
This uses a QMessageBox currently. We can try to parse just the "useful/friendly" error to display it alone while using detailedText to still display the full stderr for those that want to see the full details still.
There are errors that happen like the attached screenshots, where they only want to see Error: Failed to connect best block or whatever error is returned after "Error:".
Can likely grab whatever is after "Error:" if errors are always returned that way. They seem to be, but I have not reviewed hush code.
They initally reported wanting to change the error for "Cannot obtain a lock on data directory... Hush is probably already running", but the actual text would need to be changed in hush unless checking for this specific error in stderr and having SD display something different. I'm not sure what they'd want this specific error to say instead since it is the error that's happening, but perhaps instructions of sorts to check and stop hushd if it's running. I am also not sure how to reproduce this specific error, but possible it only happens if you close SD and re-open it quickly while it's still in the process of shutting down hushd.
There is a bounty for this from a DRGX user for 600 DRGX/600 HUSH. They would like just the actual error message displayed instead of the entire stderr from hushd.
This uses a [QMessageBox](https://doc.qt.io/qt-5/qmessagebox.html) currently. We can try to parse just the "useful/friendly" error to display it alone while using `detailedText` to still display the full stderr for those that want to see the full details still.
Changes would be here and simple for beginners or someone that wants an easy bounty: https://git.hush.is/hush/SilentDragon/src/branch/master/src/connection.cpp#L384
There are errors that happen like the attached screenshots, where they only want to see `Error: Failed to connect best block` or whatever error is returned after "Error:".
Can likely grab whatever is after "Error:" if errors are always returned that way. They seem to be, but I have not reviewed hush code.
They initally reported wanting to change the error for "Cannot obtain a lock on data directory... Hush is probably already running", but the actual text would need to be changed in hush unless checking for this specific error in stderr and having SD display something different. I'm not sure what they'd want this specific error to say instead since it is the error that's happening, but perhaps instructions of sorts to check and stop hushd if it's running. I am also not sure how to reproduce this specific error, but possible it only happens if you close SD and re-open it quickly while it's still in the process of shutting down hushd.
dev branch has some changes for this to try and display the error only with full stderr in details. For testing and reproducing the .lock file error, making the .lock file read only so it can't be deleted should work.
I changed to property-based, but one drawback seems to be no styling is applied to the message box now, at least on Windows. Needs to be looked into further.
`dev` branch has some changes for this to try and display the error only with full stderr in details. For testing and reproducing the .lock file error, making the .lock file read only so it can't be deleted should work.
Static QMessageBox functions don't support setting detailed text according to this:
https://doc.qt.io/qt-5/qmessagebox.html#the-static-functions-api
I changed to property-based, but one drawback seems to be no styling is applied to the message box now, at least on Windows. Needs to be looked into further.
One workaround for styles is to add them directly to the message box, but then they are not theme-specific colors. It seems to be some weird quirk with QT and there is probably a better fix so the theme stylesheet actually applies. I added styling for now via property until I can take another look. Details are closed by default, which is the full error message that was displaying originally. Displays like attached.
One workaround for styles is to add them directly to the message box, but then they are not theme-specific colors. It seems to be some weird quirk with QT and there is probably a better fix so the theme stylesheet actually applies. I added styling for now via property until I can take another look. Details are closed by default, which is the full error message that was displaying originally. Displays like attached.
There is a bounty for this from a DRGX user for 600 DRGX/600 HUSH. They would like just the actual error message displayed instead of the entire stderr from hushd.
This uses a QMessageBox currently. We can try to parse just the "useful/friendly" error to display it alone while using
detailedText
to still display the full stderr for those that want to see the full details still.Changes would be here and simple for beginners or someone that wants an easy bounty: https://git.hush.is/hush/SilentDragon/src/branch/master/src/connection.cpp#L384
There are errors that happen like the attached screenshots, where they only want to see
Error: Failed to connect best block
or whatever error is returned after "Error:".Can likely grab whatever is after "Error:" if errors are always returned that way. They seem to be, but I have not reviewed hush code.
They initally reported wanting to change the error for "Cannot obtain a lock on data directory... Hush is probably already running", but the actual text would need to be changed in hush unless checking for this specific error in stderr and having SD display something different. I'm not sure what they'd want this specific error to say instead since it is the error that's happening, but perhaps instructions of sorts to check and stop hushd if it's running. I am also not sure how to reproduce this specific error, but possible it only happens if you close SD and re-open it quickly while it's still in the process of shutting down hushd.
dev
branch has some changes for this to try and display the error only with full stderr in details. For testing and reproducing the .lock file error, making the .lock file read only so it can't be deleted should work.Static QMessageBox functions don't support setting detailed text according to this:
https://doc.qt.io/qt-5/qmessagebox.html#the-static-functions-api
I changed to property-based, but one drawback seems to be no styling is applied to the message box now, at least on Windows. Needs to be looked into further.
One workaround for styles is to add them directly to the message box, but then they are not theme-specific colors. It seems to be some weird quirk with QT and there is probably a better fix so the theme stylesheet actually applies. I added styling for now via property until I can take another look. Details are closed by default, which is the full error message that was displaying originally. Displays like attached.
I believe @fekt has completed this, closing