Write a PL/SQL program to demonstrate Exceptions.

Sure, here's an example of a PL/SQL program that demonstrates exceptions:

```sql
DECLARE
age INTEGER := 17;
eligible_age INTEGER := 18;

-- custom exception
too_young EXCEPTION;

-- exception handler
PRAGMA EXCEPTION_INIT(too_young, -20001);

BEGIN
IF age < eligible_age THEN
-- raise custom exception
RAISE too_young;
ELSE
DBMS_OUTPUT.PUT_LINE('You are eligible');
END IF;

EXCEPTION
-- handle custom exception
WHEN too_young THEN
DBMS_OUTPUT.PUT_LINE('You are too young');

-- handle all other exceptions
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('An error occurred: ' || SQLERRM);
END;
/
```

In this program, we declare two variables `age` and `eligible_age` with their respective values. We also define a custom exception named `too_young` and associate it with error code `-20001` using the `PRAGMA EXCEPTION_INIT` statement.

Next, we check if the `age` is less than the `eligible_age`. If it is, we raise the custom exception `too_young`. Otherwise, we display the message "You are eligible" using `DBMS_OUTPUT.PUT_LINE`.

The exception handling section catches the `too_young` exception and displays the message "You are too young". If any other exception occurs, it catches it using the `WHEN OTHERS` clause and displays the error message using `SQLERRM` function.

You can run this program in a PL/SQL environment such as Oracle SQL Developer or SQL*Plus to see the exception handling in action.