Currently AphrontDeadlockQueryException is thrown for two different
error codes. Roughly:
- A lock timeout occurred. Maybe your server is a teeny bit slow or you should adjust a config value. It's possible things will deadlock if it keeps going but we don't know.
- Deadklock. Something fundamentally bad has happened or your query is about to lead to a stack overflow session.
Since the resolution in each case is likely different and the raw
error code isn't passed along to tell them apart this is
confusing. Instead this commit creates a new exception for the timeout
case.