HANDLING EXCEPTIONS Exception Handling Exception adalah Penanganan pesan
![HANDLING EXCEPTIONS HANDLING EXCEPTIONS](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-1.jpg)
![Exception • Handling Exception adalah Penanganan pesan kesalahan pada saat run time • Pesan Exception • Handling Exception adalah Penanganan pesan kesalahan pada saat run time • Pesan](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-2.jpg)
![Contoh Exception(1 a) 1. 2. 3. 4. 5. 6. 7. 8. SET SERVEROUTPUT ON Contoh Exception(1 a) 1. 2. 3. 4. 5. 6. 7. 8. SET SERVEROUTPUT ON](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-3.jpg)
![Contoh Exception(1 b) SQL> DECLARE 2 nama employees. last_name%type; 3 BEGIN 4 SELECT last_name Contoh Exception(1 b) SQL> DECLARE 2 nama employees. last_name%type; 3 BEGIN 4 SELECT last_name](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-4.jpg)
![Contoh Exception(2 a) SQL> SET SERVEROUTPUT ON SQL> DECLARE 2 nama employees. last_name%type; 3 Contoh Exception(2 a) SQL> SET SERVEROUTPUT ON SQL> DECLARE 2 nama employees. last_name%type; 3](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-5.jpg)
![Contoh Exception(2 b) S SQL> DECLARE 2 nama employees. last_name%type; 3 BEGIN 4 SELECT Contoh Exception(2 b) S SQL> DECLARE 2 nama employees. last_name%type; 3 BEGIN 4 SELECT](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-6.jpg)
![Menangkap Exception • Exception yang dibut oleh oracle dapat ditangkap menggunakan syntax OTHERS. • Menangkap Exception • Exception yang dibut oleh oracle dapat ditangkap menggunakan syntax OTHERS. •](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-7.jpg)
![Code Exception Code Exception](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-8.jpg)
![Name Exception Name Exception](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-9.jpg)
![Name Exception Name Exception](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-10.jpg)
![Name Exception Name Exception](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-11.jpg)
![Contoh Others SQL> DECLARE 2 empno NUMBER; 3 BEGIN 4 SELECT employee_id INTO empno Contoh Others SQL> DECLARE 2 empno NUMBER; 3 BEGIN 4 SELECT employee_id INTO empno](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-12.jpg)
![Menangkap Exception User Syntax Raise • Raise_aplication_error(error number, message) • Dengan syntax diatas user/programmer Menangkap Exception User Syntax Raise • Raise_aplication_error(error number, message) • Dengan syntax diatas user/programmer](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-13.jpg)
![Contoh Raise SQL> DECLARE 2 nama VARCHAR 2(100); 3 gaji NUMBER; 4 BEGIN 5 Contoh Raise SQL> DECLARE 2 nama VARCHAR 2(100); 3 gaji NUMBER; 4 BEGIN 5](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-14.jpg)
- Slides: 14
![HANDLING EXCEPTIONS HANDLING EXCEPTIONS](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-1.jpg)
HANDLING EXCEPTIONS
![Exception Handling Exception adalah Penanganan pesan kesalahan pada saat run time Pesan Exception • Handling Exception adalah Penanganan pesan kesalahan pada saat run time • Pesan](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-2.jpg)
Exception • Handling Exception adalah Penanganan pesan kesalahan pada saat run time • Pesan kesalahan dibagi 2 yaitu : – Predifined exception (Kesalahan oracle) – User predefined exception (Kesalahan user) • Jika exception muncul dan tidak ditangani maka program akan dihentikan, namun jika ditangani maka alur program diarahkan ke exception handler.
![Contoh Exception1 a 1 2 3 4 5 6 7 8 SET SERVEROUTPUT ON Contoh Exception(1 a) 1. 2. 3. 4. 5. 6. 7. 8. SET SERVEROUTPUT ON](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-3.jpg)
Contoh Exception(1 a) 1. 2. 3. 4. 5. 6. 7. 8. SET SERVEROUTPUT ON DECLARE nama employees. last_name%type; BEGIN SELECT last_name INTO nama FROM employees WHERE employee_id = 309; DBMS_OUTPUT. PUT_LINE ('nama'); END; DECLARE * ERROR at line 1: ORA-01403: no data found ORA-06512: at line 4
![Contoh Exception1 b SQL DECLARE 2 nama employees lastnametype 3 BEGIN 4 SELECT lastname Contoh Exception(1 b) SQL> DECLARE 2 nama employees. last_name%type; 3 BEGIN 4 SELECT last_name](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-4.jpg)
Contoh Exception(1 b) SQL> DECLARE 2 nama employees. last_name%type; 3 BEGIN 4 SELECT last_name INTO nama FROM employees 5 WHERE employee_id = 309; 6 DBMS_OUTPUT. PUT_LINE ('nama'); 7 EXCEPTION 8 WHEN NO_DATA_FOUND THEN 9 DBMS_OUTPUT. PUT_LINE ('TIdak Ditemukan Datanya dalam Database'); 10 END; TIdak Ditemukan Datanya dalam Database PL/SQL procedure successfully completed.
![Contoh Exception2 a SQL SET SERVEROUTPUT ON SQL DECLARE 2 nama employees lastnametype 3 Contoh Exception(2 a) SQL> SET SERVEROUTPUT ON SQL> DECLARE 2 nama employees. last_name%type; 3](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-5.jpg)
Contoh Exception(2 a) SQL> SET SERVEROUTPUT ON SQL> DECLARE 2 nama employees. last_name%type; 3 BEGIN 4 SELECT last_name INTO nama FROM employees WHERE first_name = 'John'; 5 DBMS_OUTPUT. PUT_LINE ('John ''s last name is : ' ||nama); 6 END; DECLARE * ERROR at line 1: ORA-01422: exact fetch returns more than requested number of rows ORA-06512: at line 4
![Contoh Exception2 b S SQL DECLARE 2 nama employees lastnametype 3 BEGIN 4 SELECT Contoh Exception(2 b) S SQL> DECLARE 2 nama employees. last_name%type; 3 BEGIN 4 SELECT](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-6.jpg)
Contoh Exception(2 b) S SQL> DECLARE 2 nama employees. last_name%type; 3 BEGIN 4 SELECT last_name INTO nama FROM employees WHERE first_name = 'John'; 5 DBMS_OUTPUT. PUT_LINE ('John ''s last name is : ' ||nama); 6 EXCEPTION 7 WHEN TOO_MANY_ROWS THEN 8 DBMS_OUTPUT. PUT_LINE ('Data lebih dari satu baris'); 9 END; 10 / Data lebih dari satu baris PL/SQL procedure successfully completed.
![Menangkap Exception Exception yang dibut oleh oracle dapat ditangkap menggunakan syntax OTHERS Menangkap Exception • Exception yang dibut oleh oracle dapat ditangkap menggunakan syntax OTHERS. •](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-7.jpg)
Menangkap Exception • Exception yang dibut oleh oracle dapat ditangkap menggunakan syntax OTHERS. • Exception yang dibut oleh user dapat ditangkap menggunakan alur sebagai berikut : Daftar Exception handling dapat dilihat pada slide berikut :
![Code Exception Code Exception](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-8.jpg)
Code Exception
![Name Exception Name Exception](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-9.jpg)
Name Exception
![Name Exception Name Exception](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-10.jpg)
Name Exception
![Name Exception Name Exception](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-11.jpg)
Name Exception
![Contoh Others SQL DECLARE 2 empno NUMBER 3 BEGIN 4 SELECT employeeid INTO empno Contoh Others SQL> DECLARE 2 empno NUMBER; 3 BEGIN 4 SELECT employee_id INTO empno](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-12.jpg)
Contoh Others SQL> DECLARE 2 empno NUMBER; 3 BEGIN 4 SELECT employee_id INTO empno FROM employees ; 5 DBMS_OUTPUT. PUT_LINE(empno); 6 EXCEPTION 7 WHEN NO_DATA_FOUND THEN 8 DBMS_OUTPUT. PUT_LINE('Data Tidak Ditemukan'); 9 WHEN OTHERS THEN 10 DBMS_OUTPUT. PUT_LINE('Terjadi Error yang Lain'); 11 END; 12 / Terjadi Error yang Lain PL/SQL procedure successfully completed.
![Menangkap Exception User Syntax Raise Raiseaplicationerrorerror number message Dengan syntax diatas userprogrammer Menangkap Exception User Syntax Raise • Raise_aplication_error(error number, message) • Dengan syntax diatas user/programmer](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-13.jpg)
Menangkap Exception User Syntax Raise • Raise_aplication_error(error number, message) • Dengan syntax diatas user/programmer dapat mendefinisikan sendiri pesan kesalahannya • Angka yang boleh digunakan untuk mendefinisikan pesan kesalahan adalah -20000 s/d 20999
![Contoh Raise SQL DECLARE 2 nama VARCHAR 2100 3 gaji NUMBER 4 BEGIN 5 Contoh Raise SQL> DECLARE 2 nama VARCHAR 2(100); 3 gaji NUMBER; 4 BEGIN 5](https://slidetodoc.com/presentation_image_h/ca68f10fcb8d6507237229338599c97e/image-14.jpg)
Contoh Raise SQL> DECLARE 2 nama VARCHAR 2(100); 3 gaji NUMBER; 4 BEGIN 5 SELECT last_name, salary INTO nama, gaji 6 FROM employees WHERE employee_id = 100; 7 IF gaji > 5000 THEN 8 RAISE_APPLICATION_ERROR (-20500, 'Gaji Kebanyakan'); 9 END IF; 10 DBMS_OUTPUT. PUT_LINE(nama||' '||gaji); 11 END; 12 / DECLARE * ERROR at line 1: ORA-20500: Gaji Kebanyakan ORA-06512: at line 8
Proses penyusunan pesan pesan bisnis
Contoh ide pokok pesan bisnis
Judul iklan pesan-pesan daya tarik
Proses penulisan pesan pesan bisnis
Business message
Exception handling pl sql
Exception handling in vb net
Exception handling in java
Apa yang dimaksud dengan exception handling
Php exception handler
Exception handling pada java
No irq handler for vector
Event handling in ada
Php exception handling
Vb net error handling