I had it open on another window,
make something like this,
and put it after your defines and before your instructions
ON EXCEPTION SET error_num, isam_num, error_msg
trace 'Error at label : ' || label ;
trace 'Error: ' || error_num || ' ' || error_msg;
return -1 ;
END EXCEPTION;
on exception in (-239) SET error_num, isam_num, error_msg -- if record already exists
trace 'Warning at label=' || label || ' ' || error_num || ' ' || error_msg;
trace 'Record already exists, key is ' || v_key ;
trace 'Continue with procedure';
end exception with resume;