|
43 | 43 | use InvalidArgumentException; |
44 | 44 | use Psr\Log\LoggerInterface; |
45 | 45 | use ReflectionClass; |
| 46 | +use ReflectionException; |
46 | 47 | use Symfony\Component\Cache\Adapter\FilesystemAdapter; |
47 | 48 | use Symfony\Component\DependencyInjection\Attribute\Autowire; |
48 | 49 | use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; |
|
67 | 68 | use Symfony\Component\Security\Core\User\UserInterface; |
68 | 69 | use Symfony\Contracts\Cache\ItemInterface; |
69 | 70 | use Twig\Environment; |
| 71 | +use Twig\Error\LoaderError; |
| 72 | +use Twig\Error\RuntimeError; |
| 73 | +use Twig\Error\SyntaxError; |
70 | 74 | use ZipArchive; |
71 | 75 |
|
72 | 76 | class DOMJudgeService |
@@ -1512,6 +1516,12 @@ public function getCompileConfig(Submission $submission): string |
1512 | 1516 | ); |
1513 | 1517 | } |
1514 | 1518 |
|
| 1519 | + /** |
| 1520 | + * @throws SyntaxError |
| 1521 | + * @throws ReflectionException |
| 1522 | + * @throws RuntimeError |
| 1523 | + * @throws LoaderError |
| 1524 | + */ |
1515 | 1525 | public function getScoreboardZip( |
1516 | 1526 | Request $request, |
1517 | 1527 | RequestStack $requestStack, |
@@ -1569,7 +1579,7 @@ public function getScoreboardZip( |
1569 | 1579 | foreach ($assetMatches[1] as $file) { |
1570 | 1580 | $filepath = realpath($publicPath . '/' . $file); |
1571 | 1581 | if ($filepath === false) { |
1572 | | - throw new BadRequestHttpException("Could not find (symlinked) file: " . $file . " and " . $publicPath); |
| 1582 | + throw new Exception("Could not find (symlinked) file: " . $file . " and " . $publicPath); |
1573 | 1583 | } |
1574 | 1584 | if (!str_starts_with($filepath, $publicPath) && |
1575 | 1585 | !str_starts_with($filepath, $this->vendorDir) |
|
0 commit comments