Return more information in case of error with csvRead / read_csv 46/9046/2
Sylvestre Ledru [Tue, 18 Sep 2012 12:13:18 +0000 (14:13 +0200)]
Change-Id: Iecf7e65e206b90049b791c49a07deabf3da55e3d

scilab/modules/spreadsheet/sci_gateway/cpp/sci_csvRead.cpp
scilab/modules/spreadsheet/sci_gateway/cpp/sci_csvTextScan.cpp

index bd1b868..5972b11 100644 (file)
@@ -538,8 +538,13 @@ int sci_csvRead(char *fname)
             }
             break;
 
-            case CSV_READ_READLINES_ERROR:
             case CSV_READ_COLUMNS_ERROR:
+            {
+                Scierror(999, _("%s: can not read file %s: Error in the column structure\n"), fname, filename);
+            }
+            break;
+
+            case CSV_READ_READLINES_ERROR:
             case CSV_READ_ERROR:
             {
                 Scierror(999, _("%s: can not read file %s.\n"), fname, filename);
index 85b962c..3ea70af 100644 (file)
@@ -428,8 +428,13 @@ int sci_csvTextScan(char *fname)
             }
             break;
 
-            case CSV_READ_READLINES_ERROR:
             case CSV_READ_COLUMNS_ERROR:
+            {
+                Scierror(999, _("%s: can not read text: Error in the column structure\n"), fname);
+            }
+            break;
+
+            case CSV_READ_READLINES_ERROR:
             case CSV_READ_ERROR:
             {
                 Scierror(999, _("%s: can not read text.\n"), fname);