I'm importing files to a MySQL DB using the LOAD DATA INFILE command
.
Some files may have an error which results in a console message like:
mysql.connector.errors.DatabaseError: 1265 (01000): Data truncated for column 'z' at row x
How can I put this error message to a QMessageBox
so the user of the .exe has an indicator where to check the dataset?
try:
cursor.execute(query)
except:
QMessageBox.warning(self, "Failure", ...Console Output...)