On Oct 25, 4:17 pm, Michael Mahemoff <[email protected]> wrote:
> When macros go wrong, tiddlywiki shows "Error in macro foo". Is there
> a way to make it not do this, so the error bubbles up to the (Firebug)
> console as with normal Javascript errors.
>
> Likewise for plugin evaluation?

For macros, you could simplify the core's invokeMacro() function to
leave out the error checks and try{...}catch(e){...} handling, like
this:

---------------------------
function invokeMacro(place,macro,params,wikifier,tiddler) {
var m = config.macros[macro];
var tiddlerElem=story.findContainingTiddler(place);
window.tiddler=tiddlerElem?store.getTiddler(tiddlerElem.getAttribute
("tiddler")):null;
window.place = place;
m.handler(place,macro,params.readMacroParams
(),wikifier,params,tiddler);
}
---------------------------

If m is null, or m.handler is undefined, or the m.handler throws an
error when invoked, then that error will no longer be caught and
should propagate all the way out the the debugger.

enjoy,
-e

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tiddlywikidev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to