fix: add try/catch error logging in expired flow renderers
This commit is contained in:
@@ -81,13 +81,29 @@ public class ReportOrchestrator : IReportOrchestrator
|
||||
if (isExpired)
|
||||
{
|
||||
// Flusso expired: ExpiredAnagrafica + Eventi + Chart
|
||||
try
|
||||
{
|
||||
pdfSections.Add(_expiredAnagraficaRenderer.Render(reportData));
|
||||
_logger.LogInformation("Sezione 'ExpiredAnagrafica' generata per {Isin}", isin);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Errore nella sezione 'ExpiredAnagrafica' per {Isin}", isin);
|
||||
throw;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var eventiRenderer = _sectionRenderers.First(r => r.SectionName == "Eventi");
|
||||
pdfSections.Add(eventiRenderer.Render(reportData));
|
||||
_logger.LogInformation("Sezione 'Eventi' generata per {Isin}", isin);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Errore nella sezione 'Eventi' per {Isin}", isin);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Flusso attuale: Anagrafica + Eventi + Scenario (condizionale)
|
||||
|
||||
Reference in New Issue
Block a user