public function check($data) { try { $row = 0; for ($i = 0; $i < count($data); $i++) { $row++; DataChecker::checkDefectType($data[$i]['id_defect_type']); DataChecker::checkPlan($data[$i]['id_plan']); DataChecker::checkAmountDefect($data[$i]['amount'], $data[$i]['id_plan']); } } catch (Exception $e) { throw new Exception($e->getMessage() . 'в строчці ' . $row); } }