FIX_TABLE_NOT_FOUND_ISSUE
This commit is contained in:
parent
47d778bfe2
commit
ab43cdc68a
@ -1076,10 +1076,23 @@ class EmployeeController extends AdminController
|
||||
}
|
||||
|
||||
return $this->respond(['dataStatus' => true, 'code' => 200, 'data' => $html, 'file_data' => $file_name, 'excel_data' => $excel_data], 200);
|
||||
} catch (\Exception $e) {
|
||||
} catch (\Throwable $th) {
|
||||
|
||||
$errorData = [
|
||||
'message' => $th->getMessage(),
|
||||
'file' => $th->getFile(),
|
||||
'line' => $th->getLine(),
|
||||
'code' => $th->getCode(),
|
||||
'trace' => $th->getTraceAsString(),
|
||||
'trace_array' => $th->getTrace(), // full array version (optional)
|
||||
'function' => $th->getTrace()[0]['function'] ?? null,
|
||||
'class' => $th->getTrace()[0]['class'] ?? null,
|
||||
];
|
||||
|
||||
// Handle exception
|
||||
$errorMessage = 'Error occurred: ' . $e->getMessage();
|
||||
$errorMessage = 'Error occurred:' . PHP_EOL . json_encode($errorData, JSON_PRETTY_PRINT);
|
||||
$this->myLogger->logme('error', $errorMessage);
|
||||
|
||||
$html = '<div class="text-center">No Data Found</div>';
|
||||
return $this->respond(['dataStatus' => false, 'code' => 500, 'data' => $html, 'file_data' => $file_name], 500);
|
||||
}
|
||||
|
||||
@ -22,15 +22,13 @@ table.dataTable tbody td {
|
||||
</thead>
|
||||
|
||||
<tbody class="font-12">
|
||||
<?php for ($i = 1; $i <= $count; $i++): ?>
|
||||
<tr>
|
||||
<?php foreach ($tbody[$i] as $data): ?>
|
||||
<td>
|
||||
<?php echo $data;?>
|
||||
</td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php endfor; ?>
|
||||
<?php helper('excel_util_helper'); foreach ($tbody as $body) { if(check_row_is_empty_or_null($body)){break;} ?>
|
||||
<tr>
|
||||
<?php foreach ($body as $data){ ?>
|
||||
<td><?= esc($data) ?></td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- end .table-responsive -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user