Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 1.26 KB

File metadata and controls

38 lines (25 loc) · 1.26 KB

Error Handling in Java

The exercises in this project are designed to help you understand error handling in Java.

Getting Started

To get started, open the project file located in error-handling-in-java/pom.xml in IntelliJ.

Project Overview

This project contains a Main class that contains several methods that demonstrate various aspects of error handling in Java. There is one other supporting classes in the project:

  1. The CustomDivideByZeroException class is a custom exception that is thrown when a division by zero is attempted. You WILL need to modify this class.

The ExerciseTests class contains tests for the Main class.

Exercise

To complete this exercise, you will need to follow the TODO comments in the Main class and the CustomDivideByZeroException class.

Running the Tests

As always, final verification of your code should be done by running the unit tests.

To run the tests, right-click on the test/java/org.example/src/ExerciseTests class and select "Run 'ExercisesTests'". This will run all of the tests for the exercises. When a test succeeds, you will see a green checkmark next to the test. When a test fails, you will see a red X next to the test. Once all of the tests pass, you have completed the exercises.