Skip to content
Permalink
Browse files

show errors when generating report.

related to #391
  • Loading branch information...
tpokorra committed Sep 27, 2019
1 parent 118d5bd commit 0d4d00fc231d52ac42611722450863e5c5fa3b0a
Showing with 20 additions and 5 deletions.
  1. +8 −2 csharp/ICT/Petra/Server/lib/MReporting/core/Calculator.cs
  2. +12 −3 js-client/src/lib/reports.js
@@ -130,8 +130,16 @@ public TRptDataCalculator(String APathStandardReports, String APathCustomReports
ReturnValue = true;
}
}
catch (TargetInvocationException TExc)
{
TLogging.Log("TargetInvocationException in GenerateResult: ");
TLogging.Log(TExc.InnerException.Message);
AErrorMessage = TExc.InnerException.Message;
AException = TExc.InnerException;
}
catch (Exception Exc)
{
TLogging.Log("in GenerateResult");
TLogging.Log(Exc.ToString());
TLogging.Log(Exc.StackTrace);

@@ -140,8 +148,6 @@ public TRptDataCalculator(String APathStandardReports, String APathCustomReports
FParameters.Save(Path.GetDirectoryName(TSrvSetting.ServerLogFile) + Path.DirectorySeparatorChar + "LogAfterException.json");
}

Console.WriteLine(Exc.StackTrace);

AErrorMessage = Exc.Message;
AException = Exc;
}
@@ -92,9 +92,18 @@ function check_for_report(AReportID) {
if (!parsed.result.JobFinished) {
// console.log("Report progress: " + parsed.Caption + ' ' + parsed.StatusMessage);
setTimeout(function() { check_for_report(AReportID); }, 1000);
}
else {
print_report(AReportID);
} else {
api.post('serverMReporting.asmx/TReportGeneratorWebConnector_GetSuccess', r).then(function (data) {
parsed = JSON.parse(data.data.d);
if (parsed == true) {
print_report(AReportID);
} else {
api.post('serverMReporting.asmx/TReportGeneratorWebConnector_GetErrorMessage', r).then(function (data) {
display_message(i18next.t(data.data.d), "fail");
myPleaseWaitDiv.hidePleaseWait();
});
}
});
}
});
}

0 comments on commit 0d4d00f

Please sign in to comment.
You can’t perform that action at this time.