Debugging

This commit is contained in:
Rick Falkvinge
2017-10-21 11:00:56 +02:00
parent 9e931a630e
commit 11f729bdea
+15 -6
View File
@@ -379,15 +379,24 @@ namespace Swarmops.Site.Pages.Ledgers
}
catch (Exception e)
{
reader.BaseStream.Position = 0; // rewind stream to retry parse with different file type
try
{
reader.BaseStream.Position = 0; // rewind stream to retry parse with different file type
// Try a payment file instead
ImportedPaymentData paymentData = ImportBankgiroSE (reader, currentUser, organization);
// Try a payment file instead
ImportedPaymentData paymentData = ImportBankgiroSE(reader, currentUser, organization);
// Apparently, we were successful
// Apparently, we were successful
GuidCache.Set (guid + "-Result", ImportResultsCategory.Payments);
GuidCache.Set (guid + "-ResultDetails", paymentData);
GuidCache.Set(guid + "-Result", ImportResultsCategory.Payments);
GuidCache.Set(guid + "-ResultDetails", paymentData);
}
catch (Exception innerException)
{
// rethrow the original exception
throw e;
}
}
}
}