1 / 10

Exception

Exception.

brent
Download Presentation

Exception

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Exception

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

  3. Try… Except… Bilatidakterjadiexception, makasemuabarispadabagian try akandijalankan, namunbagianexcept tidakakandijalankandansebaliknya.

  4. Try… Except…

  5. Try… Except… var bil: integer; Begin bil:= StrToInt(Edit1.Text); showmessage('Input Benar : '+IntToStr(bil)); End;

  6. Try… Except…

  7. Try… Except… var bil : integer; Begin try bil := StrToInt(Edit1.Text); showmessage('Input Benar : '+IntToStr(bil)); except MessageDlg('SalahInput',mtError,[mbOK],0); end; End;

  8. Try… Except… Tools > Options… Pilih : Debugger > Language Exeptions Add > EConvertError

  9. Try… Except…

  10. 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;

More Related