--- 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 |
| BackupRestorePlugin | none |
| BlackListPlugin | none |
| ChartPlugin | none |
| ColorPickerPlugin | none |
| CommentPlugin | none |
| EditTablePlugin | none |
| GaugePlugin | none |
| GeoLookupPlugin | none |
| HeadlinesPlugin | none |
| InterwikiPlugin | none |
| JQueryPlugin | none |
| LocalCityTimePlugin | none |
| PreferencesPlugin | none |
| QRCodePlugin | none |
| RecentVisitorPlugin | none |
| RenderListPlugin | none |
| SetGetPlugin | none |
| ShareMePlugin | none |
| SlideShowPlugin | none |
| SmiliesPlugin | none |
| TWikiDrawPlugin | none |
| TWikiOrgPlugin | none |
| TablePlugin | none |
| TagMePlugin | none |
| TinyMCEPlugin | none |
| TwistyPlugin | none |
| VarCachePlugin | none |
| WysiwygPlugin | none |
| Handler | Plugins |
|---|---|
| afterCommonTagsHandler | VarCachePlugin |
| afterEditHandler | WysiwygPlugin |
| afterSaveHandler | TagMePlugin |
| beforeAttachmentSaveHandler | BlackListPlugin |
| beforeCommonTagsHandler | EditTablePlugin PreferencesPlugin TwistyPlugin VarCachePlugin WysiwygPlugin |
| beforeEditHandler | TinyMCEPlugin WysiwygPlugin |
| beforeMergeHandler | WysiwygPlugin |
| beforeSaveHandler | BlackListPlugin CommentPlugin WysiwygPlugin |
| commonTagsHandler | SpreadSheetPlugin BackupRestorePlugin BlackListPlugin ChartPlugin CommentPlugin EditTablePlugin HeadlinesPlugin JQueryPlugin LocalCityTimePlugin SlideShowPlugin SmiliesPlugin TWikiDrawPlugin TWikiOrgPlugin TagMePlugin |
| endRenderingHandler | BlackListPlugin This handler is deprecated - please check for updated versions of the plugins that use it! |
| initPlugin | SpreadSheetPlugin BackupRestorePlugin BlackListPlugin ChartPlugin ColorPickerPlugin CommentPlugin EditTablePlugin GaugePlugin GeoLookupPlugin HeadlinesPlugin InterwikiPlugin JQueryPlugin LocalCityTimePlugin PreferencesPlugin QRCodePlugin RecentVisitorPlugin RenderListPlugin SetGetPlugin ShareMePlugin SlideShowPlugin SmiliesPlugin TWikiDrawPlugin TWikiOrgPlugin TablePlugin TagMePlugin TinyMCEPlugin TwistyPlugin VarCachePlugin WysiwygPlugin |
| modifyHeaderHandler | WysiwygPlugin |
| postRenderingHandler | BlackListPlugin EditTablePlugin PreferencesPlugin WysiwygPlugin |
| preRenderingHandler | InterwikiPlugin SmiliesPlugin TablePlugin |
| startRenderingHandler | RenderListPlugin WysiwygPlugin 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 |