Keep SQL errors quite but raise unnormal access violations, so the exception handler can catch them.

This commit is contained in:
Ansgar Becker
2010-04-23 20:51:36 +00:00
parent 764388b89c
commit 6bb8bb6875

View File

@ -477,8 +477,12 @@ begin
except except
// The above SQL can easily throw an exception, e.g. if a table is corrupted. // The above SQL can easily throw an exception, e.g. if a table is corrupted.
// In such cases we create a dummy row, including the error message // In such cases we create a dummy row, including the error message
on E:Exception do on E:Exception do begin
if E.ClassType = EAccessViolation then
Raise
else
AddNotes(DBObj.Database, DBObj.Name, 'error', E.Message); AddNotes(DBObj.Database, DBObj.Name, 'error', E.Message);
end;
end else begin end else begin
AddNotes(DBObj.Database, DBObj.Name, STRSKIPPED+FormatByteNumber(DBObj.Size), ''); AddNotes(DBObj.Database, DBObj.Name, STRSKIPPED+FormatByteNumber(DBObj.Size), '');
end; end;