r3 - 04 Sep 2002 - 16:11:33 - ColasNahabooYou are here: TWiki >  Codev Web > TracePluginSyntaxErrors
Tags:
, create new tag
If you make a syntax error in a plugin, it is sometimes silently ignored, with no output in logs, either server or TWiki.

To make these errors appear in TWiki debug.txt file, one need just to append one line to lib/TWiki/Plugins.pm, after eval "use $p;"; around line 140:

     eval "use $p;";
      &TWiki::Func::writeDebug( "ERROR in Plugin $plugin: $@" ) if ( $@ ); 

I suggest this makes it in the official distrib. It should incur no overhead. Attached is the patch to Dec 2001 version.

-- ColasNahaboo - 03 Sep 2002

What it perhaps be better to use writeWarning? I think we only use the Func routines from within Plugins.

-- JohnTalintyre - 04 Sep 2002

Fine with me.
-- ColasNahaboo - 04 Sep 2002

Topic attachments
I Attachment Action Size Date Who Comment
elsepatch pluginerrordebug.patch manage 0.4 K 03 Sep 2002 - 23:18 ColasNahaboo  
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo