Hello everyone. I know you can use [Application.GetLastError()] but this only works in some cases.

for example in this case the app shows an error and I can't save it:

rTestVal = true;

if rTestVal <= 0 then end

nError = Application.GetLastError();
if (nError ~= 0) then
    TextFile.WriteFromString(_SourceFolder.."\\error.l og", "Error in: "..Debug.GetEventContext().."r\n\Error: ".._tblErrorMessages[nError], false);

Now the question, is there any way to save a record in .txt, .ini, .log... of all the errors that can be generated?