You are here: Foswiki>Tasks Web>Item13295 (19 Mar 2015, GeorgeClark)Edit Attach

Item13295: Errors thrown in beforeSaveHander get are not displayed

pencil
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: FoswikiUISave
Branches: master
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
When the AntiWikiSpamPlugin throws an Oops exception during the beforeSaveHandler, it ends up reported as an error in the version control system.

Foswiki::UI::Save catches any error and converts it to an oopsattention save_error. It should pass through Oops failures without modifying them.

-- GeorgeClark - 07 Mar 2015

Crawford. I think this was introduced in your mass change of catch Error::Simple to catch Error. In cases where it was an oops, you lose the original error. distro:74b3a0706fa2

Not sure if it's needed everywhere, but think you also need to pass through any OopsExceptions unmodified.

I'll let you decide if we need to add the following to all or any of your other changes:

    catch Foswiki::OopsException with {
        shift->throw();    # propagate
    }

It may be safer just to add it wherever you converted from catch Error::Simple to just catch Error.

-- GeorgeClark - 07 Mar 2015

Add to that, errors from the User Registration process.

-- GeorgeClark - 12 Mar 2015
 
Topic revision: r3 - 19 Mar 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy