def read_error_handler(func):
 @wraps(func)
 def error_handler_wrapper(*args, **kwargs):
  try:
   return func(*args, **kwargs)
  except Exception:
   return (args[0], '')
 return error_handler_wrapper

def read_error_handler ( func ) : @ wraps ( func ) def error_handler_wrapper ( * args , ** kwargs ) : try : return func ( * args , ** kwargs ) except Exception : return ( args [ 0 ] , '' ) return error_handler_wrapper
ignores exceptions by always returning the filename and an empty string as read file content .