Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ParserAbstract.php

function ParserAbstract::checkTryCatch

File

vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php, line 1049

Class

ParserAbstract

Namespace

PhpParser

Code

protected function checkTryCatch(TryCatch $node) : void {
    if (empty($node->catches) && null === $node->finally) {
        $this->emitError(new Error('Cannot use try without catch or finally', $node->getAttributes()));
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal