Skip to content

Commit 2cac2cf

Browse files
committed
Harmonize exception class.
1 parent e998245 commit 2cac2cf

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/View/CsvView.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Cake\Datasource\EntityInterface;
88
use Cake\Utility\Hash;
99
use Cake\View\SerializedView;
10-
use Exception;
1110

1211
/**
1312
* A view class that is used for CSV responses.
@@ -214,7 +213,7 @@ protected function _serialize(array|string $serialize): string
214213
* Renders the body of the data to the csv
215214
*
216215
* @return void
217-
* @throws \Exception
216+
* @throws \Cake\Core\Exception\CakeException
218217
*/
219218
protected function _renderContent(): void
220219
{
@@ -227,7 +226,7 @@ protected function _renderContent(): void
227226

228227
foreach ((array)$serialize as $viewVar) {
229228
if (is_scalar($this->viewVars[$viewVar])) {
230-
throw new Exception("'" . $viewVar . "' is not an array or iteratable object.");
229+
throw new CakeException("'" . $viewVar . "' is not an array or iteratable object.");
231230
}
232231

233232
foreach ($this->viewVars[$viewVar] as $_data) {

0 commit comments

Comments
 (0)