Index: /branches/eam_branches/ipp-20130419/psModules/src/camera/pmFPAConstruct.c
===================================================================
--- /branches/eam_branches/ipp-20130419/psModules/src/camera/pmFPAConstruct.c	(revision 35508)
+++ /branches/eam_branches/ipp-20130419/psModules/src/camera/pmFPAConstruct.c	(revision 35509)
@@ -110,10 +110,20 @@
     assert(hdu);
 
+    // XXXX here is the issue : we need to avoid raising an error here
     if (fpa->hdu) {
         // Something's already here
         if (fpa->hdu != hdu) {
-            psError(PS_ERR_IO, true, "Unable to add HDU since FPA already has one.\n");
-        }
-        return false;
+# define TEST1 1
+# if (TEST1)
+	    psError(PS_ERR_IO, true, "Unable to add HDU since FPA already has one.\n");
+# else
+	    psWarning ("Unable to add HDU since FPA already has one.\n");
+# endif
+        }
+# if (TEST1)
+        return false;
+# else
+        return true;
+# endif
     }
     fpa->hdu = psMemIncrRefCounter(hdu);
@@ -1154,7 +1164,11 @@
               phdu->blankPHU = true;
               if (install) {
-                  if (!addHDUtoFPA(fpa, phdu) || !addSource_FPA_CHIP(fpa, format) ||
-                      !pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU,
-                                         true, NULL)) {
+		  if (!addHDUtoFPA(fpa, phdu)) {
+		      psError(PS_ERR_UNKNOWN, false, "Unable to add HDU to FPA.");
+                      psFree(phdu);
+                      psFree(view);
+                      return NULL;
+		  }		  
+                  if (!addSource_FPA_CHIP(fpa, format)) {
                       psError(PS_ERR_UNKNOWN, false, "Unable to add source.");
                       psFree(phdu);
@@ -1162,14 +1176,30 @@
                       return NULL;
                   }
-              }
+                  if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU, true, NULL)) {
+                      psError(PS_ERR_UNKNOWN, false, "Unable to read concepts.");
+                      psFree(phdu);
+                      psFree(view);
+                      return NULL;
+                  }
+	      }
               psFree(phdu);
               return view;
             case PM_FPA_LEVEL_CELL:
+	      phdu->blankPHU = true;
               if (install) {
-                  phdu->blankPHU = true;
-                  if (!addHDUtoFPA(fpa, phdu) || !addSource_FPA_CELL(fpa, format) ||
-                      !pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU,
-                                         true, NULL)) {
+                  if (!addHDUtoFPA(fpa, phdu)) {
+                      psError(PS_ERR_UNKNOWN, false, "Unable to add HDU to FPA.");
+                      psFree(phdu);
+                      psFree(view);
+                      return NULL;
+                  }
+                  if (!addSource_FPA_CELL(fpa, format)) {
                       psError(PS_ERR_UNKNOWN, false, "Unable to add source.");
+                      psFree(phdu);
+                      psFree(view);
+                      return NULL;
+                  }
+                  if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU, true, NULL)) {
+                      psError(PS_ERR_UNKNOWN, false, "Unable to read concepts.");
                       psFree(phdu);
                       psFree(view);
@@ -1180,10 +1210,20 @@
               return view;
             case PM_FPA_LEVEL_NONE:
+	      phdu->blankPHU = false;
               if (install) {
-                  phdu->blankPHU = false;
-                  if (!addHDUtoFPA(fpa, phdu) || !addSource_FPA_NONE(fpa, format) ||
-                      !pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU,
-                                         true, NULL)) {
+                  if (!addHDUtoFPA(fpa, phdu)) {
+                      psError(PS_ERR_UNKNOWN, false, "Unable to add HDU to FPA.");
+                      psFree(phdu);
+                      psFree(view);
+                      return NULL;
+                  }
+                  if (!addSource_FPA_NONE(fpa, format)) {
                       psError(PS_ERR_UNKNOWN, false, "Unable to add source.");
+                      psFree(phdu);
+                      psFree(view);
+                      return NULL;
+                  }
+                  if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU, true, NULL)) {
+                      psError(PS_ERR_UNKNOWN, false, "Unable to read concepts.");
                       psFree(phdu);
                       psFree(view);
