Summary

Completed

A fundamental aspect in the development of any T-SQL application is how you handle errors. Handled badly, an error can stop your program in its tracks. This module has shown you how to control and manage errors. You've seen how to raise errors intentionally, set up alerts to fire when errors occur, and create complex structured error handling.

In this module, you've learned how to:

  • Raise errors using the RAISERROR statement.
  • Raise errors using the THROW statement.
  • Use the @@ERROR system variable.
  • Create custom errors.
  • Create alerts that fire when errors occur.