---
title: "How to create custom exceptions?"  
description: "How to create custom exceptions?"  
author: "Sumit Kesarwani"  
published: 2014-08-26  
updated: 2020-09-22  
canonical: https://www.mindstick.com/interview/2013/how-to-create-custom-exceptions  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# How to create custom exceptions?

Your class should extend class Exception, or some more specific type thereof.

## Answers

### Answer by Sumit Kesarwani

Your class should extend class Exception, or some more specific type thereof.


---

Original Source: https://www.mindstick.com/interview/2013/how-to-create-custom-exceptions

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
