ExceptionUtilsV1.java Source code

Java tutorial

Introduction

Here is the source code for ExceptionUtilsV1.java

Source

import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.commons.lang.exception.NestableException;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class ExceptionUtilsV1 {
    public static void main(String args[]) {
        try {
            loadFile();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void loadFile() throws Exception {
        try {
            FileInputStream fis = new FileInputStream(new File("nosuchfile"));
        } catch (FileNotFoundException fe) {
            throw new NestableException(fe);
        }
    }
}