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

Changing error reporting?

Discussion in 'XenForo Development Discussions' started by Member 3639, Jan 2, 2011.

  1. Member 3639

    Member 3639 Active Member

    Okay so when you use the xenforo framework on your website for integration it will then also use xenforos error handling classes, which for me is becoming tiresome finding every little time i haven't fully set something.

    As if you have an undefined index, the error reporting doesn't tell you, it just craps out with Xen's unexpected error message (even though the script would still run perfectly).

    Is there a way to turn error reporting off, maybe passing something to a function?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    I've moved this to Development Questions to ensure it reaches the correct audience.
  3. Shadab

    Shadab Well-Known Member

    Assuming you're talking about the "An unexpected error occurred. Please try again later." message; that would appear only if you don't have debug mode enabled. It's highly recommended that you enable the debug mode while you're developing your application. (and disable it before going live).

    While in debug mode...
    » From outside the MVC environment:


    » From inside a controller:

  4. Member 3639

    Member 3639 Active Member

    I would rather just have the option to disable it on my website.
  5. Shadab

    Shadab Well-Known Member

    Erm... Why would you do that?

    Anyway, you can remove XenForo's error and exception handlers using restore_error_handler() and restore_exception_handler(), respectively, right after you initialize the framework.
  6. Member 3639

    Member 3639 Active Member

    I have my reasons why, like using my own error handler which this gets in the way of.

Share This Page