{"repo":"zalando/faux-pas","free":true,"listed":false,"github":"https://github.com/zalando/faux-pas","clone":"git clone https://github.com/zalando/faux-pas.git","description":"A library that simplifies error handling for Functional Programming in Java","language":"Java","stars":143,"topics":["java","functional-programming","exception-handling","error-handling","completable-future","monitoring"],"license":"MIT","category":"analytics","readme_excerpt":"Faux Pas: Error handling in Functional Programming Faux pas noun , /fəʊ pɑː/: blunder; misstep, false step F aux P as is a library that simplifies error handling for F unctional P rogramming in Java. It fixes the issue that none of the functional interfaces in the Java Runtime by default is allowed to throw checked exceptions. - Technology stack : Java 8+, functional interfaces - Status : 0.x, originally ported from Riptide, used in production Example Features - Checked exceptions for functional interfaces - Compatible with the JDK types Dependencies - Java 8 or higher - Lombok (no runtime dependency) Installation Add the following dependency to your project: Usage Throwing functional interfaces Faux Pas has a variant of every major functional interface from the Java core: - ThrowingRunnable - ThrowingSupplier - ThrowingConsumer - ThrowingFunction - ThrowingUnaryOperator - ThrowingPredicate - ThrowingBiConsumer - ThrowingBiFunction - ThrowingBinaryOperator - ThrowingBiPredicate The followings statements apply to each of them: - extends the official interface, i.e. they are 100% compatible - sneakily throws the original exception Creation The way the Java runtime implemented functional interfaces always requires additional type information, either by using a cast or a local variable: As a workaround there is a static factory method for every interface type in FauxPas . All of them are called throwingRunnable , throwingSupplier and so forth. It allows for concise one-line state","default_branch":null,"files":null,"tree":[],"storefront":"/r/zalando","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/zalando/faux-pas/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}