Is there a
SET command or similar I can enable to get the same error handling as a try/catch block? Specifically halting the script/procedure on the first error.
The only way I've currently found so far is to wrap the whole query in a try/catch such as
BEGIN TRY -- procedure body goes here END TRY BEGIN CATCH THROW; END CATCH
While this hack does work to enable the correct error handling behaviour it just feels wrong to have a catch block that just re-throws the error.
In this particular case there's nothing more I need to do with the error other than halt the script and throw the error back out to the script runner.