# Exceptions

### There are two types of Exceptions

* Hardware Exceptions
* Software Exceptions

![](https://1846927083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mj9GKP_mf1AnaApJEIA%2Fuploads%2FuAdb5yOyLLrUKhew2Fxk%2Fimage.png?alt=media\&token=1dd23149-fa56-4523-ac46-16d820165788)

### Hardware Exceptions

![](https://1846927083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mj9GKP_mf1AnaApJEIA%2Fuploads%2FcQxDrRml7uZsDiHCoSGx%2Fimage.png?alt=media\&token=f37baaa7-a0c8-4438-b09a-f7cc8c92fd69)

### Software Exceptions

![](https://1846927083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mj9GKP_mf1AnaApJEIA%2Fuploads%2F4mZayJ8o5VbClMORFPUh%2Fimage.png?alt=media\&token=f1efa978-7881-42d6-86ce-b8c8a07ce64e)

### SEH (Structured Exception Handling)

![](https://1846927083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mj9GKP_mf1AnaApJEIA%2Fuploads%2Fvxskm7fgwbN5kCrk8ejK%2Fimage.png?alt=media\&token=819181fe-c1e0-406a-bc1d-bbf036e98baa)

### Example: Here the application is setting its own custom exception handler and then forcing a division by zero exception

![](https://1846927083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mj9GKP_mf1AnaApJEIA%2Fuploads%2FSKxY9EHBVJLWxmE6LvkR%2Fimage.png?alt=media\&token=a6a9b02b-4cbc-4384-8142-6fea387fa465)

![](https://1846927083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mj9GKP_mf1AnaApJEIA%2Fuploads%2FKWitX2d9DN9yFb6CSukB%2Fimage.png?alt=media\&token=c7aa4b73-935f-4dc5-8e30-acb5c6f6e580)

![](https://1846927083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mj9GKP_mf1AnaApJEIA%2Fuploads%2FXxHIJBVoeGVqXkJFnbHP%2Fimage.png?alt=media\&token=9284382b-786d-4e26-8dbb-58e5e9835241)

![](https://1846927083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mj9GKP_mf1AnaApJEIA%2Fuploads%2FAFxDmFeBBWisNcRJE3fc%2Fimage.png?alt=media\&token=203303e8-dd68-4add-98be-8b0c0b808e07)

![](https://1846927083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mj9GKP_mf1AnaApJEIA%2Fuploads%2FQWG3c2yOeR3cT5q1UQF6%2Fimage.png?alt=media\&token=dade107a-26eb-4044-8ed1-4024b64873d6)
