Added MySQL exception callback.