You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanna catch, trace and log errors, and hide them from users of my website, so I've put a lil' function at the top of my bootstrap script to turn Errors into ErrorExceptions, and it's been throwing Exceptions without mercy. A little digging later, and it looks like you've used them bloody @'s in your shorthand2xpath method.
I've been pondering over it for a little less than an hour now, and I can't really think of a solution that's particularly graceful. Pushing 7 empty elements on top of the array? God, no. Using isset in every ternary operation? Being forced through an entire season of an American sitcom (of your picking!) sounds more appealing. Predefine the array with array_fill? I guess, maybe?
But yeah, anyway, maybe you've got an idea.
The text was updated successfully, but these errors were encountered:
Basically there is no error handling in DOMTemplate at the moment, so I'm open to ideas. It does need to be robust because some errors are normal (an xpath returned no elements).
I will give error handling my consideration to try find something elegant, it's the biggest "must have" feature right now IMO.
Does there need to be error handling? I think that'd be more a task for the application. I think what would make sense is: not to throw errors, and definitely not to silence them; and, replace pre-programmed errors with exceptions where that's appropriate.
I wanna catch, trace and log errors, and hide them from users of my website, so I've put a lil' function at the top of my bootstrap script to turn Errors into ErrorExceptions, and it's been throwing Exceptions without mercy. A little digging later, and it looks like you've used them bloody
@
's in yourshorthand2xpath
method.I've been pondering over it for a little less than an hour now, and I can't really think of a solution that's particularly graceful. Pushing 7 empty elements on top of the array? God, no. Using
isset
in every ternary operation? Being forced through an entire season of an American sitcom (of your picking!) sounds more appealing. Predefine the array witharray_fill
? I guess, maybe?But yeah, anyway, maybe you've got an idea.
The text was updated successfully, but these errors were encountered: