Skip to content

Commit 93581cb

Browse files
committed
fixup! Refactored previewAction controller to improve error response (#404)
1 parent cc841e6 commit 93581cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/MVC/Symfony/Controller/Content/PreviewController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function previewContentAction(
140140
['exception' => $e]
141141
);
142142
if ($this->debugMode) {
143-
throw new BadStateException($message, 1, $e);
143+
throw new BadStateException("Preview page", $message, $e);
144144
}
145145

146146
return new Response($message);
@@ -232,7 +232,7 @@ private function buildResponseForGenericPreviewError(Location $location, Content
232232
EOF;
233233

234234
if ($this->debugMode) {
235-
throw new BadStateException($message, 1, $e);
235+
throw new BadStateException("Preview page", $message, $e);
236236
}
237237

238238
return new Response($message);

0 commit comments

Comments
 (0)