harden doc loader

This commit is contained in:
team 1
2026-02-17 14:20:34 +01:00
parent 812f2bf265
commit 1bb753e071

View File

@@ -46,7 +46,7 @@ final class DocumentLoader
$pdf = $parser->parseFile($path);
$text = $pdf->getText();
} catch (\Throwable $e) {
throw new \RuntimeException("Failed to parse PDF: {$path}", 0, $e);
throw new \RuntimeException("Failed to parse PDF: {$path}. Error: " . $e->getMessage(), 0, $e);
}
return $this->normalize($text);