def _give_error_message(self, message, raise_exception=False):
    error_message = QMessageBox()
    error_message.setParent(self.sender())
    error_message.setWindowTitle('ERROR')
    error_message.setText(message)
    error_message.setWindowModality(QtCore.Qt.WindowModal)
    error_message.exec_()
    if raise_exception:
        raise Exception(message)
def _give_error_message(self, message, raise_exception=False):
    error_message = QMessageBox()
    error_message.setParent(self.sender())
    error_message.setWindowTitle('ERROR')
    error_message.setText(message)
    error_message.setWindowModality(QtCore.Qt.WindowModal)
    error_message.exec_()
    if raise_exception:
        raise Exception(message)