harden doc loader
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user