def _local_conversion(func, x):
 try:
  y = func(x)
 except ValueError as e:
  raise ConeSearchError(str(e))
 else:
  return y

def _local_conversion ( func , x ) : try : y = func ( x ) except ValueError as e : raise ConeSearchError ( str ( e ) ) else : return y
try func(x) and replace valueerror with conesearcherror .