-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show throwing linkers as pending rather than idle/failing, fixed modu…
…le dependency
- Loading branch information
1 parent
f64c313
commit ed6272b
Showing
3 changed files
with
15 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 7 additions & 10 deletions
17
src/main/java/com/machinezoo/foxcache/EmptyCacheException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
// Part of Fox Cache: https://foxcache.machinezoo.com | ||
package com.machinezoo.foxcache; | ||
|
||
import org.apache.commons.lang3.exception.*; | ||
import com.machinezoo.noexception.*; | ||
|
||
public class EmptyCacheException extends RuntimeException { | ||
private static final long serialVersionUID = 1L; | ||
private static class EmptyCacheExceptionSilencing extends ExceptionHandler { | ||
@Override | ||
public boolean handle(Throwable exception) { | ||
return exception instanceof EmptyCacheException; | ||
} | ||
} | ||
public static ExceptionHandler silence() { | ||
return new EmptyCacheExceptionSilencing(); | ||
} | ||
private static final long serialVersionUID = 1L; | ||
public static boolean caused(Throwable exception) { return ExceptionUtils.stream(exception).anyMatch(x -> x instanceof EmptyCacheException); } | ||
private static class EmptyCacheExceptionSilencing extends ExceptionHandler { | ||
@Override public boolean handle(Throwable exception) { return caused(exception); } | ||
} | ||
public static ExceptionHandler silence() { return new EmptyCacheExceptionSilencing(); } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters