mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Better error messages in the view and tiddler macros
This commit is contained in:
parent
7f136dd898
commit
2ecb1f670c
@ -84,7 +84,7 @@ exports.macro = {
|
||||
content = parseTree ? parseTree.tree : [];
|
||||
}
|
||||
} else {
|
||||
content = [Renderer.TextNode("{{** Tiddler recursion error in <<tiddler>> macro **}}")];
|
||||
content = [Renderer.ErrorNode("Tiddler recursion error in <<tiddler>> macro")];
|
||||
}
|
||||
parents.push(renderTemplate);
|
||||
for(t=0; t<content.length; t++) {
|
||||
|
@ -21,7 +21,7 @@ exports.macro = {
|
||||
},
|
||||
execute: function() {
|
||||
if(!this.tiddlerTitle) {
|
||||
return Renderer.TextNode("{{** Missing tiddler **}}");
|
||||
return Renderer.ErrorNode("Missing tiddler");
|
||||
} else {
|
||||
var tiddler = this.store.getTiddler(this.tiddlerTitle),
|
||||
v = tiddler[this.params.field],
|
||||
@ -43,7 +43,7 @@ exports.macro = {
|
||||
if(parents.indexOf(tiddler.title) === -1) {
|
||||
content = this.store.parseTiddler(tiddler.title).tree;
|
||||
} else {
|
||||
content = [Renderer.TextNode("{{** Tiddler recursion error in <<view>> macro **}}")];
|
||||
content = [Renderer.ErrorNode("Tiddler recursion error in <<view>> macro")];
|
||||
}
|
||||
parents = parents.slice(0);
|
||||
parents.push(tiddler.title);
|
||||
|
Loading…
Reference in New Issue
Block a user