mirror of
https://github.com/onionshare/onionshare.git
synced 2025-03-03 11:49:33 -05:00
Catch general Exception in the UI when trying to connect or start a share, and raise as Alert
This commit is contained in:
parent
063a8dc669
commit
c1f06d99d7
@ -247,6 +247,7 @@
|
||||
"error_port_not_available": "OnionShare port not available",
|
||||
"history_receive_read_message_button": "Read Message",
|
||||
"error_tor_protocol_error": "There was an error with Tor: {}",
|
||||
"error_generic": "There was an unexpected error with OnionShare:\n{}",
|
||||
"moat_contact_label": "Contacting BridgeDB…",
|
||||
"moat_captcha_label": "Solve the CAPTCHA to request a bridge.",
|
||||
"moat_captcha_placeholder": "Enter the characters from the image",
|
||||
|
@ -106,6 +106,11 @@ class OnionThread(QtCore.QThread):
|
||||
message = self.mode.common.gui.get_translated_tor_error(e)
|
||||
self.error.emit(message)
|
||||
return
|
||||
except Exception as e:
|
||||
# Handle any other error that wasn't in the list above
|
||||
message = strings._("error_generic").format(e.args[0])
|
||||
self.error.emit(message)
|
||||
return
|
||||
|
||||
|
||||
class WebThread(QtCore.QThread):
|
||||
|
@ -210,6 +210,12 @@ class TorConnectionThread(QtCore.QThread):
|
||||
)
|
||||
self.error_connecting_to_tor.emit(message)
|
||||
|
||||
except Exception as e:
|
||||
# Handle any other error that wasn't in the list above
|
||||
message = strings._("error_generic").format(e.args[0])
|
||||
self.error_connecting_to_tor.emit(message)
|
||||
return
|
||||
|
||||
def _tor_status_update(self, progress, summary):
|
||||
self.tor_status_update.emit(progress, summary)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user