What should the error processing look like in a stored procedure that is written to be called from a front end written in JAVA? How can the message get back to the user's screen? Example, if an UPDATE fails, what shouold come next in the stored procedure?

UPDATE referral
set lastdate = today
where rfr_id = @jvnl_id

********IF @@ERROR <>0
NOW WHAT