SHARE
TWEET

Untitled

a guest Jan 24th, 2020 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  DECLARE @ErrorMessage NVARCHAR(4000);  
  2.     DECLARE @ErrorSeverity INT;  
  3.     DECLARE @ErrorState INT;  
  4.  
  5.     SELECT  
  6.         @ErrorMessage = ERROR_MESSAGE(),  
  7.         @ErrorSeverity = ERROR_SEVERITY(),  
  8.         @ErrorState = ERROR_STATE();  
  9.  
  10.     -- Use RAISERROR inside the CATCH block to return error  
  11.     -- information about the original error that caused  
  12.     -- execution to jump to the CATCH block.  
  13.     RAISERROR (@ErrorMessage, -- Message text.  
  14.                @ErrorSeverity, -- Severity.  
  15.                @ErrorState -- State.  
  16.                );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top