IF you're trying to handle the custom error, then you'll have to bind it to a exception using PRAGMA EXCEPTION_INIT.
Another thing to note is that the exception you've attached is for your main procedure my_procedure, the compilation error is because the IF/LOOPs are still not closed in the body since exception signifies start of the exception handler
Here's how it should look
CREATE OR REPLACE PROCEDURE my_procedure
AS
custom_exception EXCEPTION;
PRAGMA EXCEPTION_INIT (custom_exception, -20001); -- bind error code to custom_exception
BEGIN
FOR item IN some_cursor
LOOP
IF (condition)
THEN
BEGIN
other_procedure;
EXCEPTION
WHEN custom_exception -- handle error from other_procedure
THEN
GOTO end_loop;
END;
--some code here
END IF;
<<end_loop>>
NULL;
END LOOP;
END;