Tuesday 27 May 2008

Catching Regulus errors

Peter Ljunglöf wondered whether error reporting in Regulus could be improved, and had a couple of suggestions. I've implemented and checked in the following improvements:
  1. All error messages should now be printed to stderr.

  2. When processing fails during execution of the Regulus command , a line of the form

    Error processing command:

    should be printed. This was not previously the case.

  3. There is a new top-level predicate

    regulus_batch_storing_errors(+ConfigFile, +Commands, -ErrorString)

    which is like regulus_batch/2, except that it instantiates ErrorString with a string containing all the errors printed out during execution of Commands.
I expect there will be some glitches (I had to change a lot of lines of code), so please let me know if thing don't work as intended.

No comments: