Patch level : 12.0 nopatch
Files correlati : Commento : Aggiunto stack trace in caso di eccezione nel file stack.log
This commit is contained in:
parent
04e35d8c30
commit
7f062427f4
@ -755,13 +755,18 @@ void execute_transactions(TArray & transactions, TLog_report & log, bool interac
|
|||||||
pref.ext("");
|
pref.ext("");
|
||||||
while (isdigit(pref[pref.len() - 1]))
|
while (isdigit(pref[pref.len() - 1]))
|
||||||
pref.rtrim(1);
|
pref.rtrim(1);
|
||||||
while (i >= 0)
|
|
||||||
|
int totalTransaction = 0;
|
||||||
|
|
||||||
|
while (i >= 0)
|
||||||
{
|
{
|
||||||
TRACE("Salvataggio registrazione %d", i);
|
TRACE("Salvataggio registrazione %d - %s = %s %s starts with %s", i , (const char*)t.executer(), (const char*)table, (const char*)t.name(), (const char*)pref);
|
||||||
if (t.executer() == table && t.name().starts_with(pref))
|
if (t.executer() == table && t.name().starts_with(pref))
|
||||||
{
|
{
|
||||||
t.write();
|
t.write();
|
||||||
processed.set(i);
|
processed.set(i);
|
||||||
|
totalTransaction++;
|
||||||
|
TRACE("Got it %d", totalTransaction);
|
||||||
}
|
}
|
||||||
i = transactions.succ(i);
|
i = transactions.succ(i);
|
||||||
while (processed[i])
|
while (processed[i])
|
||||||
@ -774,39 +779,43 @@ void execute_transactions(TArray & transactions, TLog_report & log, bool interac
|
|||||||
|
|
||||||
if (file2app(table, app))
|
if (file2app(table, app))
|
||||||
{
|
{
|
||||||
TFilename filemask(pref);
|
if (totalTransaction > 0)
|
||||||
TString_array files;
|
{
|
||||||
|
TFilename filemask(pref);
|
||||||
|
TString_array files;
|
||||||
|
|
||||||
filemask << "*" << "." << t.ext();
|
filemask << "*" << "." << t.ext();
|
||||||
app << (interactive ? " -i" : " -b") << filemask;
|
app << (interactive ? " -i" : " -b") << filemask;
|
||||||
if (prog_msg.full())
|
if (prog_msg.full())
|
||||||
app << " -m\"" << prog_msg << "\"";
|
app << " -m\"" << prog_msg << "\"";
|
||||||
app << " -u" << user();
|
app << " -u" << user();
|
||||||
TExternal_app cmd(app);
|
TExternal_app cmd(app);
|
||||||
|
|
||||||
TRACE("Aggiornamento registrazione %d", i);
|
TRACE("Aggiornamento registrazioni");
|
||||||
cmd.run();
|
cmd.run();
|
||||||
list_files(filemask, files);
|
TRACE("Fine aggiornamento registrazione");
|
||||||
TRACE("Aggiornamneto log");
|
list_files(filemask, files);
|
||||||
FOR_EACH_ARRAY_ROW(files, r, str)
|
TRACE("Aggiornamento log");
|
||||||
{
|
FOR_EACH_ARRAY_ROW(files, r, str)
|
||||||
TTransaction t(*str);
|
{
|
||||||
TString_array msgs;
|
TTransaction t(*str);
|
||||||
|
TString_array msgs;
|
||||||
|
|
||||||
log.log(0, t.record_header());
|
log.log(0, t.record_header());
|
||||||
t.get_warnings(msgs);
|
t.get_warnings(msgs);
|
||||||
FOR_EACH_ARRAY_ROW(msgs, nm, msg)
|
FOR_EACH_ARRAY_ROW(msgs, nm, msg)
|
||||||
log.log(1, *msg);
|
log.log(1, *msg);
|
||||||
if (t.result_ok())
|
if (t.result_ok())
|
||||||
log.log(0, "Eseguita");
|
log.log(0, "Eseguita");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
t.get_errors(msgs);
|
t.get_errors(msgs);
|
||||||
FOR_EACH_ARRAY_ROW(msgs, nm, msg)
|
FOR_EACH_ARRAY_ROW(msgs, nm, msg)
|
||||||
log.log(2, *msg);
|
log.log(2, *msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
remove_files(filemask, false);
|
remove_files(filemask, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user