final public function handleFailure()

in src/FailureHandler.hack [50:77]


  final public function handleFailure(string $kind, string $name): void {
    if ($kind === 'class' || $kind === 'type') {
      $this->handleFailedType($name);
      return;
    }
    if ($kind === 'function') {
      $idx = \strrpos($name, '\\');
      if ($idx !== false) {
        $suffix = \substr($name, $idx + 1);
        if (\function_exists($suffix, /* autoload = */ false)) {
          return;
        }
      }
      $this->handleFailedFunction($name);
      return;
    }
    if ($kind === 'constant') {
      $idx = \strrpos($name, '\\');
      if ($idx !== false) {
        $suffix = \substr($name, $idx + 1);
        if (\defined($suffix, /* autoload = */ false)) {
          return;
        }
      }
      $this->handleFailedConstant($name);
      return;
    }
  }