Matt Gemmell

My new book CHANGER is out now!

An action-adventure novel — book 1 in the KESTREL series.

★★★★★ — Amazon

Thistle Error-handling

Development 1 min read

Today is the day I'll be releasing a development version of Thistle - look out for that later, 
and certainly within the next 10-12 hours.

In preparation for this release, I've made a few further improvements, mostly related to error-handling.
Specifically, the following improvements have been made:
  • We now show the "No entries found" error message on the appropriate category's type, instead of on the global default type.
  • There is a new "non-existent category" error message, which is shown on the default type. This will be shown if someone enters a category URL for a non-existent category.
  • There is a new "post doesn't exist" error, shown on the appropriate category's type. This will be shown if someone enters a permalink URL to a non-existent post, or a permalink URL which is malformed in some way.
  • The date-related errors are improved (and are shown on the appropriate category's type). We now trap malformed dates (including non-numeric dates) soonest, and show an appropriate error message. Previously, Thistle would try to process malformed dates if they were of a valid length (as PHPosxom does).

Error messages indicating problems with the <code>$datadir</code>, or the <code>$authorsfile</code>, <code>$metafile</code> or <code>$etagsfile</code>, 
are still shown on a blank page, and result in immediate termination of processing. These errors are pretty much unrecoverable, so it doesn't 
make sense to try and show them on an existing type (which would be impossible anyway in the case of <code>$datadir</code> problems). 
This is consistent with PHPosxom's behaviour.

Additionally, we now no longer show the category-name header at permalink URLs. Again, this is consistent with PHPosxom.


I'm temporarily freezing development of Thistle as of the date/time of this post; the rest of my work today will be towards getting the development 
release ready. I'll try to write some basic docs; I'll at least explain all the options, give basic new-install instructions, and instructions on 
switching from PHPosxom. Stay tuned.