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
|
||||
// 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
|
||||
on E:Exception do
|
||||
on E:Exception do begin
|
||||
if E.ClassType = EAccessViolation then
|
||||
Raise
|
||||
else
|
||||
AddNotes(DBObj.Database, DBObj.Name, 'error', E.Message);
|
||||
end;
|
||||
end else begin
|
||||
AddNotes(DBObj.Database, DBObj.Name, STRSKIPPED+FormatByteNumber(DBObj.Size), '');
|
||||
end;
|
||||
|
Reference in New Issue
Block a user