Yes, whenever you get to raise this custom error in SQL, you can return some integer value like
RAISERROR( 'Invalid id', 16, 1 )
SELECT '1';
RETURN
This way you can get a separate value for any raised error at the front-end while executing the stored procedure, and you can display the message accordingly on your front end, and then put a blank as
return "";
in other catch blocks, to avoid showing those exceptions to users.
Hope this helps.