One thought on “How can you create and raise your own customized exception in PL/SQL block?”

  1. Just add a BEGIN EXCEPTION and END block where you want to to be. For example…

    create or replace procedure…

    my_exception EXCEPTION;

    begin

    begin
    do some stuff…

    if condition then
    raise my_exception;
    endif;

    exception
    when my_exception THEN
    handle the exception
    end;

    more stuff…

    exception
    when others then

    end;

Leave a Reply

Your email address will not be published. Required fields are marked *