1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Database Error handling?

Discussion in 'XenForo Pre-Sales Questions' started by Kuma, Jul 29, 2010.

  1. Kuma

    Kuma Active Member

    How will database errors be handled when and if they occur?
  2. Cezz

    Cezz Well-Known Member

    Good question, I would like to know this also... I hope there is a detailed error log going to be built into xenForo as standard... IE if there is a DB error it will output the script that it happened it, the URL that was loaded at the time, the session details and the actual error.. This would make error tracking so much easier.
  3. Mike

    Mike XenForo Developer Staff Member

    DB errors, like any PHP error as well, throw exceptions. They can be caught if the code needs it (to ignore errors, for example). If they aren't caught, they propagate up to the nice "server error" error handler, which a few people have seen :) That error handler automatically logs the error with line and backtrace info, as well as the URL, user, and GET/POST info in it. I already used it to track down a few errors today.

    There's no interface for it yet though, so I'm using straight MySQL. :)
  4. Kuma

    Kuma Active Member

    How are database errors logged? Will our inboxes suffer mysql is unable to connect death?
  5. Cezz

    Cezz Well-Known Member

    Nice I am really happy to hear you guys have thought about all of this, this is awesome, look forward to seeing this when you build a UI around it also... :)

Share This Page