procedure Main(a: Integer) begin if a < 0 then Error; end; procedure Exit; begin ShowMessage('Error'); Exit Main end;