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

Changing error reporting?

Member 3639

Active member
#1
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?
 

Shadab

Well-known member
#3
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).
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:

1_outside_mvc_setup.png

» From inside a controller:

2_mvc_setup.png
 

Shadab

Well-known member
#5
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.