Example usage for java.nio.file InvalidPathException printStackTrace

List of usage examples for java.nio.file InvalidPathException printStackTrace

Introduction

In this page you can find the example usage for java.nio.file InvalidPathException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:ru.icc.cells.ssdc.App.java

private static Path parseCatDirectoryParam(String catDirectoryParam) {
    if (null != catDirectoryParam) {
        try {/* ww w.j  av a2  s.  com*/
            return Paths.get(catDirectoryParam);
        } catch (InvalidPathException e) {
            System.err.println("The cat directory path is invalid");
            e.printStackTrace();
        }
    }
    return null;
}

From source file:ru.icc.cells.ssdc.App.java

private static Path parseOutputDirectoryParam(String outputDirectoryParam) {
    if (null != outputDirectoryParam) {
        try {/*ww w.  ja  v  a 2  s.  c om*/
            return Paths.get(outputDirectoryParam);
        } catch (InvalidPathException e) {
            System.err.println("The output directory path is invalid");
            e.printStackTrace();
        }
    } else {
        // Creating default output directory
        String defaultOutputDirectoryPath = inputExcelFile.getParent();
        return Paths.get(defaultOutputDirectoryPath);
    }
    return null;
}