mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Keep SQL errors quite but raise unnormal access violations, so the exception handler can catch them.
This commit is contained in:
@ -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
|
||||||
AddNotes(DBObj.Database, DBObj.Name, 'error', E.Message);
|
if E.ClassType = EAccessViolation then
|
||||||
|
Raise
|
||||||
|
else
|
||||||
|
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;
|
||||||
|
Reference in New Issue
Block a user