Exception handling in Java

 

What happens when the program or software throws several errors or not responding to end user while using software which was built by you, the people who are using your software gets frustrated and they will not come back to …

Java try-catch block

 

In my previous article, I have explained about exception handling, in this article, I am going to explain to you how to use try-catch block in Java

Let me take a simple example, the code which you see below will  …

Java multiple catch blocks

 

In my previous article, I have explained about java try-catch block, in this article, I am going to cover how to use multiple catch blocks in Java exceptions handling

You can handle multiple exceptions by using multiple catch blocks, but …

Java : Log error messages with Log4j

In this article, I am going to cover how to log error messages, here I am using log4j logging framework, first you need to update POM with the below dependency

Step 1:

Java custom exception class

 

In this article, I am going to explain to you how to write custom exception class or user-defined exception, the custom exception class should extend from Exception, here instead of using FileNotFoundException I am using custom new ExcelFileNotFoundException class

User-defined exception:…

Java try with resources

 

In my previous article, I have explained how to use try-catch-final in java,  in this article I am going to cover  try-with -resources which is an automatic resource management in Java Exception handling

The try-with-resources is introduced in …

Selenium : How to generate extent reports

 

In this article,  I am going to showcase you how to generate extent reports in selenium, you can use TestNG reports to check status of test cases but those are not user-friendly, instead of that you can use Extent reports

If …