I checked a java guide and found this example :
try {
// Block of code with multiple exit points
}
finally {
// Block of code that is always executed when the try block is exited,
// no matter how the try block is exited
}
A sample code in eclipse works fine. However when using Oxygene and this code :
class method ConsoleApp.Main(args: array of String);
begin
try
// if length(str)=0 then raise new Exception(); // -< jumps to finally
if length(str)=0 then exit ; // -< doesn’t jump to finally
finally
System.out.println(‘finally done’);
end ;
end;
the ‘exit’ method doesn’t pass the ‘finally’ section exiting the method. Is this correct or a bug in my opinion?