Navigation Menu

Skip to content

Commit

Permalink
Item13295: Don't override Oops errors during save
Browse files Browse the repository at this point in the history
If a beforeSaveHandler thows an OopsException, UI::Save was intercepting
it and replacing it with a less informative Oops message.

Propagate OopsExceptions rather than replacing them.
  • Loading branch information
gac410 committed Mar 7, 2015
1 parent f07586a commit 9c83764
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/lib/Foswiki/UI/Save.pm
Expand Up @@ -653,6 +653,9 @@ WARN
try {
$topicObject->save(%$saveOpts);
}
catch Foswiki::OopsException with {
shift->throw(); # propagate
}
catch Error with {
throw Foswiki::OopsException(
'attention',
Expand All @@ -674,6 +677,9 @@ WARN
try {
$a->{tom}->copyAttachment( $a->{name}, $topicObject );
}
catch Foswiki::OopsException with {
shift->throw(); # propagate
}
catch Error with {
throw Foswiki::OopsException(
'attention',
Expand Down

0 comments on commit 9c83764

Please sign in to comment.