Replaced THROW with RAISERROR

Removed another dependency on SQL Server 2012 or later, in the form of
THROW, which was replaced by the old RAISERROR instead.