mirror of
https://github.com/borg-qt/borg-qt.git
synced 2024-06-27 11:45:04 +02:00
16 lines
359 B
Python
16 lines
359 B
Python
from PyQt5.QtWidgets import QMessageBox
|
|
|
|
|
|
class BorgException(Exception):
|
|
pass
|
|
|
|
|
|
def show_error(e):
|
|
"""Helper function to show an error dialog."""
|
|
message = QMessageBox()
|
|
message.setIcon(QMessageBox.Warning)
|
|
message.setText("Error")
|
|
message.setWindowTitle("Borg-Qt Error")
|
|
message.setInformativeText(e.args[0])
|
|
message.exec_()
|