Tell what to do when missing MySQL privilege

Affects issues:
- Close #1510
This commit is contained in:
Risto Lahtela 2020-08-08 17:20:17 +03:00
parent 9e235518b3
commit b2b983b05a

View File

@ -123,6 +123,11 @@ public class DBOpException extends IllegalStateException implements ExceptionWit
context.related("Constraint Violation")
.whatToDo("Report this, there is an SQL Constraint Violation.");
break;
// Custom rules based on reported errors
case 1142:
context.related("Missing privilege")
.whatToDo("Grant the required privileges to your MySQL user (often 'REFERENCES' privilege is missing).");
break;
default:
context.related("Unknown SQL Error code");
}