CSV import web service - cosmetics on the reporting in case the data set is empty

SVN:trunk[1067]
This commit is contained in:
Romain Quetiez
2011-02-03 15:50:48 +00:00
parent 4441fb41b9
commit 283f7dc9f8

View File

@@ -259,6 +259,11 @@ try
//
// Check parameters format/consistency
//
if (strlen($sCSVData) == 0)
{
throw new ExchangeException("Missing data - at least one line is expected");
}
if (!MetaModel::IsValidClass($sClass))
{
throw new BulkLoadException("Unknown class: '$sClass'");