Introduction
Custom exception classes let you create your own error types to better explain problems in your program.
When you want to clearly show a specific problem in your code.
When built-in errors are too general and don't explain the issue well.
When you want to catch and handle a special error differently.
When you want to add extra information to an error.
When you want your program to be easier to understand and fix.