Add a template and functions for signalling user errors (as opposed to internal errors).