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("");
|
||||
while (isdigit(pref[pref.len() - 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))
|
||||
{
|
||||
t.write();
|
||||
processed.set(i);
|
||||
totalTransaction++;
|
||||
TRACE("Got it %d", totalTransaction);
|
||||
}
|
||||
i = transactions.succ(i);
|
||||
while (processed[i])
|
||||
@ -774,39 +779,43 @@ void execute_transactions(TArray & transactions, TLog_report & log, bool interac
|
||||
|
||||
if (file2app(table, app))
|
||||
{
|
||||
TFilename filemask(pref);
|
||||
TString_array files;
|
||||
if (totalTransaction > 0)
|
||||
{
|
||||
TFilename filemask(pref);
|
||||
TString_array files;
|
||||
|
||||
filemask << "*" << "." << t.ext();
|
||||
app << (interactive ? " -i" : " -b") << filemask;
|
||||
if (prog_msg.full())
|
||||
app << " -m\"" << prog_msg << "\"";
|
||||
app << " -u" << user();
|
||||
TExternal_app cmd(app);
|
||||
filemask << "*" << "." << t.ext();
|
||||
app << (interactive ? " -i" : " -b") << filemask;
|
||||
if (prog_msg.full())
|
||||
app << " -m\"" << prog_msg << "\"";
|
||||
app << " -u" << user();
|
||||
TExternal_app cmd(app);
|
||||
|
||||
TRACE("Aggiornamento registrazione %d", i);
|
||||
cmd.run();
|
||||
list_files(filemask, files);
|
||||
TRACE("Aggiornamneto log");
|
||||
FOR_EACH_ARRAY_ROW(files, r, str)
|
||||
{
|
||||
TTransaction t(*str);
|
||||
TString_array msgs;
|
||||
TRACE("Aggiornamento registrazioni");
|
||||
cmd.run();
|
||||
TRACE("Fine aggiornamento registrazione");
|
||||
list_files(filemask, files);
|
||||
TRACE("Aggiornamento log");
|
||||
FOR_EACH_ARRAY_ROW(files, r, str)
|
||||
{
|
||||
TTransaction t(*str);
|
||||
TString_array msgs;
|
||||
|
||||
log.log(0, t.record_header());
|
||||
t.get_warnings(msgs);
|
||||
FOR_EACH_ARRAY_ROW(msgs, nm, msg)
|
||||
log.log(1, *msg);
|
||||
if (t.result_ok())
|
||||
log.log(0, "Eseguita");
|
||||
else
|
||||
{
|
||||
t.get_errors(msgs);
|
||||
FOR_EACH_ARRAY_ROW(msgs, nm, msg)
|
||||
log.log(2, *msg);
|
||||
}
|
||||
}
|
||||
remove_files(filemask, false);
|
||||
log.log(0, t.record_header());
|
||||
t.get_warnings(msgs);
|
||||
FOR_EACH_ARRAY_ROW(msgs, nm, msg)
|
||||
log.log(1, *msg);
|
||||
if (t.result_ok())
|
||||
log.log(0, "Eseguita");
|
||||
else
|
||||
{
|
||||
t.get_errors(msgs);
|
||||
FOR_EACH_ARRAY_ROW(msgs, nm, msg)
|
||||
log.log(2, *msg);
|
||||
}
|
||||
}
|
||||
remove_files(filemask, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user