function invokeWithErrorHandling (
  handler,
  context,
  args,
  vm,