NightSpirit2
13 years agoNew Contributor
DelphiScript exceptions handling
Hi all,
I have faced with problem that try .. except block doesn't handle object recognition exceptions.
Example function that call nonexistent process:
I have faced with problem that try .. except block doesn't handle object recognition exceptions.
Example function that call nonexistent process:
function testTryExcept;
begin
try
Sys.Process('anyProcessName');
except
Log.Message('Process doesn''t exist');
end;
end;
Rises 'Process not found' error and cause script execution stop.
Should it rise object not found exception and this exception should be trapped by except section?