add sample of customized error handling functions