Silent and Noisy errors

59 views
Skip to first unread message

Joe Armstrong

unread,
Mar 12, 2018, 9:23:01 AM3/12/18
to TiddlyWiki

I have just discovered a bug in a tiddler.


I misspelled a macro name and didn't notice it – this is actually a common error of mine. 

In all programming languages I tend to see what I hoped to see rather than what is there. I'm pretty bad at spelling.


Mispellling a macro name is a serious error so I want the system to shout out loudly when this happens.


What happens in TW is the expansion of (say) <<badname args>> causes a 

silent error if baname does not exit. ie there is no replacement text.


I'd like the replacement text to be Missing macro badname -- fatal error in tiddler


Is this something I can easily fix????


I HATE silent errors in programming languages - all programming and run-time errors should cause a 

huge error message and execution should stop immediately. The error message is so the

programmer can fix the error. Stopping immediately is to avoid further damage.


I given talks about the evils of silent errors. NaN in JS for example is causes errors 

which are terribly difficult to find.


I think any error that can be detected should result in a noisy error.


Cheers


/Joe

Joe Armstrong

unread,
Mar 12, 2018, 9:39:49 AM3/12/18
to TiddlyWiki
Another (possible) silent error

This case is not so clear

If I write [[xyz]] or {{xyz}} when I'm authoring a tiddler

In most cases (not all) this is an error because I've misspelt xyz

I'd like a mode where I got BIG error messages when refereeing to
non-existent tiddlers

/Joe

Jeremy Ruston

unread,
Mar 12, 2018, 9:42:04 AM3/12/18
to tiddl...@googlegroups.com
Hi Joe

I’m afraid, as is usual with TiddlyWiki, things are a bit inconsistent for historical reasons.

There is explicit error reporting during rendering in a few cases:

* Unknown widget names display the error "Undefined widget ‘widgetttt’
* A recursive transclusion attempt will display the error "Recursive transclusion error in transclude widget” (nicely formatted in red)

Most errors beyond that are silent. In retrospect I was far too influenced by Markdown back in 2011/12 when TW5 wikitext was first being defined.

> Is this something I can easily fix????

Yes, it’d be quite an easy fix for this specific case of flagging invocations of missing macros, with the caveat that we’d need to explore the backwards compatibility implications of changing the default behaviour; noisy errors might need to opt-in.

I HATE silent errors in programming languages - all programming and run-time errors should cause a

Yes, I think it was a mistake here.

Best wishes

Jeremy

huge error message and execution should stop immediately. The error message is so the

programmer can fix the error. Stopping immediately is to avoid further damage.


I given talks about the evils of silent errors. NaN in JS for example is causes errors 

which are terribly difficult to find.


I think any error that can be detected should result in a noisy error.


Cheers


/Joe


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/6a057045-fedc-44f7-bd12-f3a2d30e46ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

TonyM

unread,
Mar 13, 2018, 1:35:12 AM3/13/18
to TiddlyWiki
Joe,

I don't doubt more debug information would be helpful but the fact such errors which including non existing tiddlers, macros with no output (because there are no results today) etc... well it is nice that the default is to show nothing in the wiki text. This allows non non-existence or Null results to simply not appear in a rendered tiddler.

In many other environments it is incumbent on the programmer to code for and catch every error or null case without exception. I am glad TiddlyWiki does not force this, however when designing and building a few more tools would be helpful.

However When designing I do insert content around where I expect a result so null output is obvious to me.

Best Wishes
Tony. 
Reply all
Reply to author
Forward
0 new messages