Amendments so that Validation\Exceptions are caught when editing a page
BUG: open ticket 7537 Fixing Validation\Exception errors
@sminnee Did anything come of catching ValidationExceptions thrown in an action method by the form and returned as a failed validation?
It seems a bit brittle to wrap every write() call in a try/catch, particularly when you include indirect calls through publish() etc. - for example, this fix missed write() requests in AssetAdmin, and I'm sure lots of other places :)
We could catch those on a higher level in LeftAndMain->handleRequest(), but don't have access to the form object at that point. Simon's suggestion of doing it in the form action itself would catch most ocurrences, and AFAICT will still work with the CMS routing and display logic, since we've overloaded the redirect() method.
Simon's point is valid. Hold up, I'll dig something up.
This is what I had done - I found the gist https://gist.github.com/2467965
It's from 23 April so it might not apply cleanly. I'll have to check my home machine to see if I have it on a proper branch there.
Initially, we were concerned with it conflicting with the work that others had "in progress". Whatever became of the GSOC form validation project?
github #178: initial work for PHP7 compatibility