But, as others have tried to tell you, it doesn't matter how you structure your TRY/CATCH if the error is occurring before they're ever entered. And there's no simple way to create a procedure within a TRY/CATCH.

Fix the stored procedure creation statement as above is the only way you can suppress the error message.

The create procedure statement is raising the error due to the syntax being wrong. The stored procedure is never created in the database. The begin try is not executing a stored procedure as the procedure does not exist. You could put EXEC {anything} in the try to get the text error displayed.

The main issue is, as Martin Smith pointed out, your error is coming from the create procedure statement. Not from exec. To elaborate further, it is a Parsing and Compilation error indicating you cannot select a column and an aggregate function with out group by(ing) it. Do this.

SELECT Country, MAX(PopulationInMillions)
FROM @t
GROUP BY Country --add this line