Mark S. wrote:
>
> There is the edge case where the $stem file is new, and there are no other 
> $stem (\d).html files. Probably can be ignored ...
>

Ciao Mark

IF, the wiki has not been saved to the downloads folder or a user deletes 
all the saved versions (probable at of housekeeping from time to time) you 
get a HUGE error message ... like this ...

wiki1
Get-Item : Cannot bind argument to parameter 'Path' because it is an empty
string.
At C:\bag\z_pa\PortableApps\tw_nine-lives\tw_nine-lives_v01.ps1:37 char:26
+       $source = Get-Item "$copyme"
+                          ~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Get-Item], 
ParameterBindingVal
   idationException
    + FullyQualifiedErrorId : 
ParameterArgumentValidationErrorEmptyStringNotAl
   lowed,Microsoft.PowerShell.Commands.GetItemCommand

My wonder  is could the error message be something less verbose  and 
intimidating? Like ...

wiki1
There are no downloads of this Wiki!

Similarly for the wiki itself, if its incorrectly named, or you moved or 
deleted it, you get ...

wiki1
Get-Item : Cannot find path 'C:\scrap\wiki1\wiki1.html' because it does not
exist.
At C:\bag\z_pa\PortableApps\tw_nine-lives\tw_nine-lives_v01.ps1:36 char:22
+       $destination = Get-Item  "$dir\$stem.html"
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: 
(C:\scrap\wiki1\wiki1.html:Strin
   g) [Get-Item], ItemNotFoundException
    + FullyQualifiedErrorId : 
PathNotFound,Microsoft.PowerShell.Commands.GetIt
   emCommand

etc...

This would be just as informative ...

wiki1
The Wiki 'C:\scrap\wiki1\wiki1.html' does not exist!

In neither case is the error fatal. 

In fact as soon as you create the needed file things carry on as normal.

Best wishes
Josiah

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/3a758021-6263-475f-b58c-f25ee64dab32%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to