diff --git a/qfq/AbstractBuildForm.php b/qfq/AbstractBuildForm.php
index b8628d2bd50c3c7bd6952ead0f7361ed1d11fb2c..d575fabca82722aa8853a78d8161c59dce19343e 100644
--- a/qfq/AbstractBuildForm.php
+++ b/qfq/AbstractBuildForm.php
@@ -371,7 +371,7 @@ abstract class AbstractBuildForm {
             default:
                 $this->store->setVar(SYSTEM_FORM_ELEMENT, $formElement['name'] . ' / ' . $formElement['id'], STORE_SYSTEM);
                 $this->store->setVar(SYSTEM_FORM_ELEMENT_COLUMN, 'mode', STORE_SYSTEM);
-                throw new UserException("Unexpected mode '" . $formElement['mode'] . "'");
+                throw new UserException("Unknown mode '" . $formElement['mode'] . "'", ERROR_UNKNOWN_MODE);
                 break;
         }
         return $attribute;
@@ -934,7 +934,7 @@ abstract class AbstractBuildForm {
      */
     public function buildDateJQW(array $formElement, $htmlFormElementId, $value) {
         // TODO: implement
-        throw new UserException("Not implemented yet: buildDateJQW()");
+        throw new UserException("Not implemented yet: buildDateJQW()", ERROR_NOT_IMPLEMENTED);
     }
 
     /**
@@ -945,7 +945,7 @@ abstract class AbstractBuildForm {
      */
     public function buildGridJQW(array $formElement, $htmlFormElementId, $value) {
         // TODO: implement
-        throw new UserException("Not implemented yet: buildGridJQW()");
+        throw new UserException("Not implemented yet: buildGridJQW()", ERROR_NOT_IMPLEMENTED);
     }
 
     /**
diff --git a/qfq/Constants.php b/qfq/Constants.php
index fb21ce95186f84bfb41a00b3c1fde3506b855a03..a3b65d77409c09fdf4d169148d6d36da3204a6e1 100644
--- a/qfq/Constants.php
+++ b/qfq/Constants.php
@@ -88,6 +88,13 @@ const ERROR_UNKNOWN_FORM_RENDER = 1028;
 const ERROR_NAME_LABEL_EMPTY = 1029;
 const ERROR_MISSING_COLUMN_ID = 1030;
 const ERROR_DEBUG = 1031;
+const ERROR_UNKNOWN_MODE = 1032;
+const ERROR_NOT_IMPLEMENTED = 1033;
+const ERROR_RESERVED_KEY_NAME = 1034;
+const ERROR_VALUE_HAS_NO_KEY = 1035;
+const ERROR_DB_EXECUTE = 1036;
+const ERROR_COLUMN_NOT_FOUND_IN_TABLE = 1037;
+
 
 // DB Errors
 //const ERROR_DB_QUERY_SIMPLE = 2000;
diff --git a/qfq/Database.php b/qfq/Database.php
index 72a089daf184c3994b1db33945639260edfcb21c..ef4916ce637798cd5345d7a256e30ed85413377c 100644
--- a/qfq/Database.php
+++ b/qfq/Database.php
@@ -145,7 +145,7 @@ class Database {
                 return $row;
             }
         }
-        throw new DbException("Column name '$columnName' not found in table '$table'.");
+        throw new DbException("Column name '$columnName' not found in table '$table'.", ERROR_COLUMN_NOT_FOUND_IN_TABLE);
     }
 
     /**
@@ -232,7 +232,7 @@ class Database {
 
         $this->stmt = $this->pdo->prepare($sql);
         if (false === $this->stmt->execute($parameterArray)) {
-            throw new DbException($this->stmt->errorInfo()[2]);
+            throw new DbException($this->stmt->errorInfo()[2], ERROR_DB_EXECUTE);
         }
 
         $count = $this->stmt->rowCount();
diff --git a/qfq/helper/HelperFormElement.php b/qfq/helper/HelperFormElement.php
index a9b5907f879974a460b6dc7335088f49d349d62b..bb262a6dd5b0c4490943f98a7845f1daf78c64ad 100644
--- a/qfq/helper/HelperFormElement.php
+++ b/qfq/helper/HelperFormElement.php
@@ -40,7 +40,7 @@ class HelperFormElement {
                         $store = Store::getInstance();
                         $store->setVar(SYSTEM_FORM_ELEMENT, $element['name'] . ' / ' . $element['id'], STORE_SYSTEM);
                         $store->setVar(SYSTEM_FORM_ELEMENT_COLUMN, 'parameter', STORE_SYSTEM);
-                        throw new UserException("Found reserved keyname '$checkKey'");
+                        throw new UserException("Found reserved keyname '$checkKey'", ERROR_RESERVED_KEY_NAME);
                     }
                 }
                 $elements[$key] = array_merge($element, $arr);
diff --git a/qfq/helper/KeyValueStringParser.php b/qfq/helper/KeyValueStringParser.php
index 870ec22372d78d2b6c6b95cb0a554474fb7059aa..8e0a9adf958b1ded64d88d034690c62467cd6a3a 100644
--- a/qfq/helper/KeyValueStringParser.php
+++ b/qfq/helper/KeyValueStringParser.php
@@ -113,7 +113,7 @@ class KeyValueStringParser {
 
             if ($key === '') {
                 // ":", ":1"
-                throw new UserException("Value has no key: '$keyValuePairString'");
+                throw new UserException("Value has no key: '$keyValuePairString'", ERROR_VALUE_HAS_NO_KEY);
             }
 
             if (count($keyValueArray) === 2) {