diff --git a/extension/Classes/Core/Form/FormAsFile.php b/extension/Classes/Core/Form/FormAsFile.php
index 38e2f9a8c0ab529427632f6425b917a6e0fd2075..c0a1c87839ccf989acb00e5d3dabef5c42bcb388 100644
--- a/extension/Classes/Core/Form/FormAsFile.php
+++ b/extension/Classes/Core/Form/FormAsFile.php
@@ -632,14 +632,15 @@ class FormAsFile
         $formElements = $database->sql($sql, ROW_REGULAR, $parameterArray); // array(array(column name => value))
 
         // Translate container references (id to name) and remove all id columns
-        $containerNames = array_reduce($formElements, function ($result, $formElement) use ($formName) {
+        $containerNames = array_reduce($formElements, function ($result, $formElement) use ($formName, $formId) {
             if ($formElement[FE_CLASS] === FE_CLASS_CONTAINER) {
                 $containerName = $formElement[FE_NAME];
-                if (in_array($containerName, $result) || $containerName === '') {
-                    throw new \UserFormException(json_encode([
-                        ERROR_MESSAGE_TO_USER => "Duplicate container names in form $formName",
-                        ERROR_MESSAGE_TO_DEVELOPER => "Container Form Elements must have a unique and nonempty name. Container name: '$containerName'."]),
-                        ERROR_FORM_INVALID_NAME);
+                if (in_array($containerName, $result)) {
+                    Thrower::userFormException("Failed exporting Form '$formName' to file."
+                        , "Container Form Elements must have a unique and nonempty name. Container name: '$containerName'. Container id: " . $formElement[FE_ID]);
+                }
+                if ($containerName === '') {
+                    Thrower::userFormException("Failed exporting Form '$formName' to file.", "Container form-elements may not have an empty name. Container id: " . $formElement[FE_ID]);
                 }
                 $result[$formElement[FE_ID]] = $containerName;
             }