If this is to function as a web service, it should probably output errors in formats that can be parsed by other tools.