code: def trap_exceptions(results, handler, exceptions=Exception):
  	
  	try:
  		for result in results:
  			yield result
  	except exceptions as exc:
  		for result in always_iterable(handler(exc)):
  			yield result
docs: Iterate through the results, but if an exception occurs, stop
  	processing the results and instead replace
  	the results with the output from the exception handler.