I am catching exceptions and for a specific exception class and error code within that class I do some custom handling. For all other exceptions, I want to use the generic error handler. Like such:
on E:EADSDatabaseError do
begin
case E.ACEErrorCode of
5132:
begin
//Custom handling
end;
else
begin
raise;
end;
end;
end;
on E:Exception do
begin
//usual handling
end;
For most codes in the original error, I want to fall through to the generic error handler. However, reraising it does not seem to allow the more general exception class handler to fire. (I’m not sure I would expect it to. I’ve never done this sort of thing before.)
Is my best option to have two try/excepts?
I can see 3 possible solutions,
something like this
in this case I would use the third one.