# Exception Handling

say it: **“ek-SEP-shun HAND-ling”** **/ɪkˈsɛpʃən ˈhændlɪŋ/**

Using try, catch, and related statements to respond to failures.

## What is **Exception Handling** in C#?

**Exception Handling** — Using try, catch, and related statements to respond to failures.

```csharp
class OrderReader
{
    int ReadQuantity(string text)
    {
        try
        {
            return int.Parse(text);
        }
        catch (FormatException)
        {
            return 0;
        }
    }
}
```

Level: Journeyman · [More C# terms at this level](https://www.ask-codey.com/glossary?category=c-sharp&level=3)

Updated: November 17, 2026

## In other subjects

- [Exception Handling in Java](https://www.ask-codey.com/glossary/exception-handling)

Source: https://www.ask-codey.com/glossary/exception-handling-c-sharp
