Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // regarding code bomb at http://stackoverflow.com/questions/17726288/
- procedure DoSomething_varaint_1;
- begin
- if Condition1 then begin
- ShowMessage('Error 1');
- Exit;
- end;
- if Condition2 then begin
- ShowMessage('Error 2');
- Exit;
- end;
- if Condition3 then begin
- ShowMessage('Error 3');
- Exit;
- end;
- .....
- Do something in the end
- ...
- end;
- (********************)
- procedure DoSomething_varaint_1;
- begin
- if Condition1 then
- raise Exception.Create('Error 1');
- if Condition2 then
- raise Exception.Create('Error 2');
- if Condition3 then
- raise Exception.Create('Error 3');
- .....
- Do something in the end
- ...
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement