- By
**brent** - Follow User

- 54 Views
- Uploaded on

Exception.

Download Presentation
## PowerPoint Slideshow about ' Exception' - brent

**An Image/Link below is provided (as is) to download presentation**

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Exception adalahsebuahistilahpemrograman yang mengacupadaperkecualian yang diakibatkankesalahanpadawaktumenjalankan program dantidakdapatdiketahuiataudidefinisikanpadawaktukompilasi. Lebihjauhlagicaratersebutdinamakandenganexception handling (penangananpengecualian).

Try… Except…

Bilatidakterjadiexception, makasemuabarispadabagian try akandijalankan, namunbagianexcept tidakakandijalankandansebaliknya.

Try… Except…

var

bil: integer;

Begin

bil:= StrToInt(Edit1.Text);

showmessage('Input Benar : '+IntToStr(bil));

End;

Try… Except…

var

bil : integer;

Begin

try

bil := StrToInt(Edit1.Text);

showmessage('Input Benar : '+IntToStr(bil));

except

MessageDlg('SalahInput',mtError,[mbOK],0);

end;

End;

Try… Except…

var

bil: integer;

Begin

try

bil:= StrToInt(Edit1.Text);

showmessage('Input Benar : '+IntToStr(bil));

except

onE:EConvertError do

MessageDlg(E.message,mtError,[mbOK],0);

end;

End;

Download Presentation

Connecting to Server..