I've read this: http://api.drupal.org/api/drupal/includes%21form.inc/function/batch_set/6 and through the source code, but I cannot see how a batch operation can flag that an error has occurred to show the error message.
I can set
$context['finished'] = 1.0; to end the batch, but I cannot see how to set
$current_set['success'] to FALSE to abort the batch and show the error message to the user.
How is this done? Is there a good example somewhere?