Skip to content

Latest commit

 

History

History
84 lines (61 loc) · 2.56 KB

README.md

File metadata and controls

84 lines (61 loc) · 2.56 KB

⁉️ Exceptional

maven-central-badge license-badge java-version-badge javadoc-badge codecov-badge

Utilities for handling exceptions.

// Automatically handle checked exceptions.
List<String> lines =
    Attempt.ignoring().get(() -> Files.readAllLines(Path.of("example.txt"))).orElseGet(List::of);

// Create checked versions of all standard functional interfaces.
CheckedSupplier<List<String>, IOException> getFileLines = () -> Files.readAllLines(Path.of("example.txt"));

Maven

<dependency>
    <groupId>com.rezzedup.util</groupId>
    <artifactId>exceptional</artifactId>
    <version><!--release--></version>
</dependency>

Versions

Find available versions on the releases page of this repository.

Maven Central: https://search.maven.org/artifact/com.rezzedup.util/exceptional

Note: Snapshot Versions

ℹ️ Snapshot releases are available at the following repository:

<repositories>
    <repository>
        <id>ossrh-snapshots</id>
        <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
    </repository>
</repositories>
Note: Shading

ℹ️ If you intend to shade this library, please consider relocating the packages to avoid potential conflicts with other projects. This library also utilizes nullness annotations, which may be undesirable in a shaded uber-jar. They can safely be excluded, and you are encouraged to do so.

Documentation

Javadoc: https://javadoc.io/doc/com.rezzedup.util/exceptional