Jump to content

Recommended Posts

Posted

Does anyone know a way that I can create a module hook that can hook into PW exceptions?

I don't see any methods in the Exception Classes that are hookable ___ .

Thanks in advance,

Posted

ok, I want to catch a DB exception inside a module... but I am thinking that modules don't get loaded if there is a DB connection error... so I think I am hooped.

Posted

If there is no hookable function you cant. And as you found out if db connect error is thrown theres nothing you can do obviously. But if you let us know what you like to do we maybe can help.

Posted

Exceptions are catchable, not hookable. I could probably add a hook to manually trigger in PW's main exception handler. Though if a DB exception occurs at bootstrap time (which is when you'd likely see it, if it occurred), then any modules wouldn't yet be loaded. This would also introduce the potential of infinite loops, like if any of the hooked functions themselves triggered an exception. It would be more likely to occur in this case (the last resort exception handler) since an exception at this point is a fatal error and means something about the system isn't working.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...