diff --git a/extension/Source/core/exceptions/AbstractException.php b/extension/Source/core/exceptions/AbstractException.php
index 620bea192a9b7a1533383e69bfe1797e81ac4d9c..548a8b9d9a4c97f9aff7d5d7bcfa24b490342cc9 100644
--- a/extension/Source/core/exceptions/AbstractException.php
+++ b/extension/Source/core/exceptions/AbstractException.php
@@ -136,24 +136,13 @@ class AbstractException extends \Exception {
                 $arrMerged = OnArray::htmlentitiesOnArray(array_merge($arrMsg, $arrDebugShow));
 
                 if (!empty($os = $arrMerged[ERROR_MESSAGE_OS] ?? '')) {
-//                    $arrMerged[EXCEPTION_SQL_FINAL] = self::sqlHighlightError($os);
-
-                    $beforeMatch = htmlentities("the right syntax to use near '", ENT_QUOTES);
-                    $afterMatch = htmlentities("' at line [0-9]*$", ENT_QUOTES);
-                    if (preg_match("/mysqli: 1064.*$beforeMatch.*$afterMatch/", $os)) {
-                        $match = explode("$beforeMatch", $os, 2)[1];
-                        $match = preg_split("/$afterMatch/", $match)[0];
-
-                        if(!empty($match )) {
-                            $splitSql = explode($match, $arrMerged[EXCEPTION_SQL_FINAL]);
-                            $match = Support::wrapTag('<span class="qfq-wavy-underline">', $match);
-                            $highlightedSql = implode($match, $splitSql);
-                            $arrMerged[EXCEPTION_SQL_FINAL] = $highlightedSql;
-                        }
-                    }
+                    // 	[ mysqli: 1146 ] Table 'crose_qfq_db.ksajfdkhaskf' doesn't exist
+                    $before=$this->getTableToken( html_entity_decode($arrMerged[ERROR_MESSAGE_OS],ENT_QUOTES));
+                    $arrMerged[EXCEPTION_SQL_FINAL] = $this->sqlHighlightError($arrMerged[ERROR_MESSAGE_OS], 'mysqli: 1146', $arrMerged[EXCEPTION_SQL_FINAL], $before, "' doesn't exist");
+                    $arrMerged[EXCEPTION_SQL_FINAL] = $this->sqlHighlightError($arrMerged[ERROR_MESSAGE_OS], 'mysqli: 1064', $arrMerged[EXCEPTION_SQL_FINAL], "the right syntax to use near '", "' at line [0-9]*$");
+                    $arrMerged[EXCEPTION_SQL_FINAL] = $this->sqlHighlightError($arrMerged[ERROR_MESSAGE_OS], 'mysqli: 1054', $arrMerged[EXCEPTION_SQL_FINAL], "Unknown column '", "' in 'field list'");
                 }
 
-
                 $htmlDebug = OnArray::arrayToHtmlTable(
                     array_merge($arrForm, $arrMerged),
                     'Debug', EXCEPTION_TABLE_CLASS);
@@ -180,6 +169,45 @@ class AbstractException extends \Exception {
         $arrShow = OnArray::htmlentitiesOnArray($arrShow);
 
         return $this->formatMessageUser($arrShow) . $htmlDebug;
+
+    }
+
+    /**
+     * @param $os
+     * @return string
+     */
+    private function getTableToken($os) {
+        $subject = "Table '.*' ";
+        $arr = preg_match("/$subject/", $os, $matches);
+        $arr= explode('.', $matches[0]??'');
+        return ($arr[0]??'') . '.';
+    }
+
+    /**
+     * @param $os
+     * @param $code
+     * @param $sql
+     * @param $before
+     * @param $after
+     * @return string
+     */
+    private function sqlHighlightError($os, $code, $sql, $before, $after) {
+
+        $beforeMatch = htmlentities($before, ENT_QUOTES);
+        $afterMatch = htmlentities($after, ENT_QUOTES);
+        if (preg_match("/$code.*$beforeMatch.*$afterMatch/", $os)) {
+            $arr = explode("$beforeMatch", $os, 2);
+            $match = $arr[1] ?? '';
+            $match = preg_split("/$afterMatch/", $match)[0];
+
+            if (!empty($match)) {
+                $splitSql = explode($match, $sql);
+                $match = Support::wrapTag('<span class="qfq-wavy-underline">', $match);
+                $highlightedSql = implode($match, $splitSql);
+                $sql = $highlightedSql;
+            }
+        }
+        return $sql;
     }
 
     /**