adding code to capture errors when delegates produce block