Skip to content

Commit 8eec919

Browse files
committed
Revert "remove try catch on blade compiler"
This reverts commit fae4c29.
1 parent 235976a commit 8eec919

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/yajra/Datatables/Helper.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public static function compileContent($content, array $data, $param)
6464
* @param string $str
6565
* @param array $data
6666
* @return string
67+
* @throws \Exception
6768
*/
6869
public static function compileBlade($str, $data = [])
6970
{
@@ -72,7 +73,14 @@ public static function compileBlade($str, $data = [])
7273
$parsed_string = $blade->compileString($str);
7374

7475
ob_start() && extract($data, EXTR_SKIP);
75-
eval('?>' . $parsed_string);
76+
77+
try {
78+
eval('?>' . $parsed_string);
79+
} catch (\Exception $e) {
80+
ob_end_clean();
81+
throw $e;
82+
}
83+
7684
$str = ob_get_contents();
7785
ob_end_clean();
7886

0 commit comments

Comments
 (0)