Skip to main content

Understanding Structured Exception Handling

  • Chapter
Pro C# 5.0 and the .NET 4.5 Framework
  • 3800 Accesses

Abstract

In this chapter, you will learn how to handle runtime anomalies in your C# code through the use of structured exception handling (often cryptically abbreviated as SEH). Not only will you examine the C# keywords that allow you to handle such matters (try, catch, throw, finally), you will also come to understand the distinction between application-level and system-level exceptions, as well as the role of the System.Exception base class. This discussion will lead into the topic of building custom exceptions and, finally, to a quick look at the exception-centric debugging tools of Visual Studio.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Andrew Troelsen

About this chapter

Cite this chapter

Troelsen, A. (2012). Understanding Structured Exception Handling. In: Pro C# 5.0 and the .NET 4.5 Framework. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4234-5_7

Download citation

Publish with us

Policies and ethics