Skip to content

Commit e21d15f

Browse files
committed
Merge branch 'feature/generate-tags-for-corrupted-source' into develop
2 parents b5b0021 + 5b5ec38 commit e21d15f

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

PHPCtags.class.php

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -343,18 +343,26 @@ private function process($file)
343343
continue;
344344
}
345345

346-
$this->setMFile((string) $filename);
346+
try {
347+
$this->setMFile((string) $filename);
348+
$this->mStructs = array_merge(
349+
$this->mStructs,
350+
$this->struct($this->mParser->parse(file_get_contents($this->mFile)), TRUE)
351+
);
352+
} catch(Exception $e) {
353+
echo "PHPParser: {$e->getMessage()} - {$filename}".PHP_EOL;
354+
}
355+
}
356+
} else {
357+
try {
358+
$this->setMFile($file);
347359
$this->mStructs = array_merge(
348360
$this->mStructs,
349361
$this->struct($this->mParser->parse(file_get_contents($this->mFile)), TRUE)
350362
);
363+
} catch(Exception $e) {
364+
echo "PHPParser: {$e->getMessage()} - {$filename}".PHP_EOL;
351365
}
352-
} else {
353-
$this->setMFile($file);
354-
$this->mStructs = array_merge(
355-
$this->mStructs,
356-
$this->struct($this->mParser->parse(file_get_contents($this->mFile)), TRUE)
357-
);
358366
}
359367
}
360368
}

0 commit comments

Comments
 (0)