--- lib/TWiki/Plugins.pm- 2004-04-26 22:57:10.000000000 -0500
+++ lib/TWiki/Plugins.pm 2004-04-26 22:59:38.000000000 -0500
@@ -246,7 +246,13 @@
foreach $theHandler ( @{$registeredHandlers{$handlerName}} ) {
# apply handler on the remaining list of args
- $status = &$theHandler;
+ eval {
+ $status = &$theHandler;
+ };
+ if($@) {
+ TWiki::writeWarning("Plugins: $theHandler ABORTED: $@");
+ return "ABORTED: $@";
+ }
if( $onlyOnceHandlers{$handlerName} ) {
if( $status ) {
return $status;
-- MartinCleaver - 27 Apr 2004
Questions:
| Plugin | Errors |
|---|---|
| SpreadSheetPlugin | none |
| AutoSectionsPlugin | none |
| BackupRestorePlugin | none |
| BlackListPlugin | none |
| CalendarPlugin | none |
| ChartPlugin | none |
| ColorPickerPlugin | none |
| CommentPlugin | none |
| DatePickerPlugin | none |
| EditTablePlugin | none |
| GaugePlugin | none |
| GeoLookupPlugin | none |
| HeadlinesPlugin | none |
| IfThenActionPlugin | none |
| InterwikiPlugin | none |
| JQueryPlugin | none |
| LocalCityTimePlugin | none |
| PercentCompletePlugin | none |
| PerlDocPlugin | none |
| PreferencesPlugin | none |
| QRCodePlugin | none |
| RecentVisitorPlugin | none |
| RenderListPlugin | none |
| SetGetPlugin | none |
| ShareMePlugin | none |
| SlideShowPlugin | none |
| SmiliesPlugin | none |
| SyntaxHighlightingPlugin | none |
| TWikiDrawPlugin | none |
| TWikiOrgPlugin | none |
| TWikiSheetPlugin | none |
| TablePlugin | none |
| TagMePlugin | none |
| TinyMCEPlugin | none |
| TwistyPlugin | none |
| VarCachePlugin | none |
| WatchlistPlugin | none |
| WysiwygPlugin | none |
| Handler | Plugins |
|---|---|
| afterAttachmentSaveHandler | IfThenActionPlugin |
| afterCommonTagsHandler | VarCachePlugin |
| afterEditHandler | WysiwygPlugin |
| afterRenameHandler | TagMePlugin WatchlistPlugin |
| afterSaveHandler | IfThenActionPlugin TagMePlugin VarCachePlugin WatchlistPlugin |
| beforeAttachmentSaveHandler | BlackListPlugin |
| beforeCommonTagsHandler | AutoSectionsPlugin EditTablePlugin PreferencesPlugin TWikiSheetPlugin TwistyPlugin VarCachePlugin WysiwygPlugin |
| beforeEditHandler | AutoSectionsPlugin TinyMCEPlugin WysiwygPlugin |
| beforeMergeHandler | WysiwygPlugin |
| beforeSaveHandler | AutoSectionsPlugin BlackListPlugin CommentPlugin VarCachePlugin WatchlistPlugin WysiwygPlugin |
| commonTagsHandler | SpreadSheetPlugin BackupRestorePlugin BlackListPlugin CalendarPlugin ChartPlugin CommentPlugin EditTablePlugin JQueryPlugin LocalCityTimePlugin SlideShowPlugin SmiliesPlugin SyntaxHighlightingPlugin TWikiOrgPlugin TWikiSheetPlugin VarCachePlugin |
| completePageHandler | IfThenActionPlugin |
| endRenderingHandler | BlackListPlugin This handler is deprecated - please check for updated versions of the plugins that use it! |
| initPlugin | SpreadSheetPlugin AutoSectionsPlugin BackupRestorePlugin BlackListPlugin CalendarPlugin ChartPlugin ColorPickerPlugin CommentPlugin DatePickerPlugin EditTablePlugin GaugePlugin GeoLookupPlugin HeadlinesPlugin IfThenActionPlugin InterwikiPlugin JQueryPlugin LocalCityTimePlugin PercentCompletePlugin PerlDocPlugin PreferencesPlugin QRCodePlugin RecentVisitorPlugin RenderListPlugin SetGetPlugin ShareMePlugin SlideShowPlugin SmiliesPlugin SyntaxHighlightingPlugin TWikiDrawPlugin TWikiOrgPlugin TWikiSheetPlugin TablePlugin TagMePlugin TinyMCEPlugin TwistyPlugin VarCachePlugin WatchlistPlugin WysiwygPlugin |
| modifyHeaderHandler | WysiwygPlugin |
| postRenderingHandler | BlackListPlugin PreferencesPlugin WysiwygPlugin |
| preRenderingHandler | AutoSectionsPlugin InterwikiPlugin SmiliesPlugin TablePlugin |
| registrationHandler | IfThenActionPlugin |
| startRenderingHandler | RenderListPlugin This handler is deprecated - please check for updated versions of the plugins that use it! |
sub applyHandlers
{
my $handlerName = shift;
my $theHandler;
if( $TWiki::disableAllPlugins ) {
return;
}
my $status;
foreach $theHandler ( @{$registeredHandlers{$handlerName}} ) {
# apply handler on the remaining list of args
eval {
$status = &$theHandler;
};
if($@) {
TWiki::writeWarning("Plugins: $theHandler ABORTED: $@");
return "ABORTED: $@";
}
if( $onlyOnceHandlers{$handlerName} ) {
if( $status ) {
return $status;
}
}
}
return undef;
}
I think we need a new TopicClassification: PatchBenchmarkingRequired
-- MartinCleaver - 16 May 2004 | ChangeProposalForm | |
|---|---|
| TopicClassification | FeatureRequest |
| TopicSummary | FIX for: a plugin breaks during a handler call, it breaks TWiki. |
| CurrentState | UnderInvestigation |
| OutstandingIssues | needs benchmarking, there is potential for really expensive operations here |
| RelatedTopics | |
| InterestedParties | |
| ProposedFor | |
| TWikiContributors | MartinCleaver |