From ab43cdc68afbfc2be31c8fb5aebc478c0631a267 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Wed, 31 Dec 2025 12:52:57 +0530 Subject: [PATCH] FIX_TABLE_NOT_FOUND_ISSUE --- app/Controllers/EmployeeController.php | 17 +++++++++++++++-- app/Views/view_file_upload_emp_list.php | 16 +++++++--------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php index 66549050..d40ee267 100755 --- a/app/Controllers/EmployeeController.php +++ b/app/Controllers/EmployeeController.php @@ -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 = '
No Data Found
'; return $this->respond(['dataStatus' => false, 'code' => 500, 'data' => $html, 'file_data' => $file_name], 500); } diff --git a/app/Views/view_file_upload_emp_list.php b/app/Views/view_file_upload_emp_list.php index 96ce9b36..aab97b08 100755 --- a/app/Views/view_file_upload_emp_list.php +++ b/app/Views/view_file_upload_emp_list.php @@ -22,15 +22,13 @@ table.dataTable tbody td { - - - - - - - - - + + + + + + +