Improved dying on MySQL errors