Are you trying to do try/excpet in a sql query binding? Don't do that that won't work. That is why you are getting caused by GatewayException: Incorrect syntax near the keyword 'except'.
The original error from before the try and except -
caused by GatewayException: Incorrect syntax near ':'.
caused by SQLServerException: Incorrect syntax near ':'.
Can you run EXEC ProductDefinition.GetMaterialName 0 in your DB workbench or the Database Query Browser? Seems like the issue may lie inside the stored procedure itself.