Skip to content

Commit a288527

Browse files
committed
Runtime error display
1 parent 599719a commit a288527

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Query/Builder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ protected function _processGet($columns = [], $returnLazy = false)
282282
$options = $this->compileOptions();
283283

284284
if ($this->groups) {
285-
abort(500, 'Group By is not available yet');
285+
throw new RuntimeException('Group By is not available yet');
286286
}
287287

288288
if ($this->aggregate) {
@@ -306,7 +306,7 @@ protected function _processGet($columns = [], $returnLazy = false)
306306
}
307307

308308
if ($this->distinct) {
309-
abort(500, 'Distinct is not available yet');
309+
throw new RuntimeException('Distinct is not available yet');
310310
}
311311

312312
//Else Normal find query
@@ -327,7 +327,7 @@ protected function _processGet($columns = [], $returnLazy = false)
327327

328328
return new Collection($data);
329329
} else {
330-
abort(500, $find->errorMessage);
330+
throw new RuntimeException('Error: '.$find->errorMessage);
331331
}
332332

333333
}
@@ -888,7 +888,7 @@ public function search($text, $columns = [], $returnLazy = false)
888888

889889
return new Collection($data);
890890
} else {
891-
abort(500, $result->errorMessage);
891+
throw new RuntimeException('Error: '.$find->errorMessage);
892892
}
893893
}
894894

0 commit comments

Comments
 (0)