<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 5, 2014 at 10:33 PM, Patrick R. Michaud <span dir="ltr"><<a href="mailto:pmichaud@pobox.com" target="_blank">pmichaud@pobox.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> page.  The pmwiki-debug.php version could do various things to help debug:<br>
<br>
</span>From a maintainer's point of view, this is a real pain, because you have<br>
to do extra work to keep the two copies in sync.  The standard way to do<br>
this in programming is using a flag variable.<br></blockquote><div><br></div><div>Yes, that's why I suggested a flag in the next paragraph. :-) </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> creating an array indexed by regex/replace strings and holding a<br>
> "Scriptname.php: lineno" string.  Then when Petko's error is triggered it<br>
> could include the script name and line #<br>
<br>
</span>I still think it's better to report things when the markup rule<br>
is registered (i.e., inside the call to Markup()), rather than when<br>
the rule is executed.  And the existence of debug_backtrace ought to<br>
mean that PmWiki doesn't need to do any special tracing of its own.</blockquote></div><br>I agree ... for this particular problem. However, if there is some unknown markup rule causing an error in some other situation that we don't know about yet this would provide a general purpose solution rather than a specific-to-this-problem solution. But I'm quite content leaving this out of core - I was just trying to generate some ideas for the RFC...</div><div class="gmail_extra"><br></div><div class="gmail_extra">-Peter</div></div>