public class NotAppliedException extends FastRuntimeException
FastRuntimeException
thus performs much better than normal RuntimeExceptions. Here is one
example of using NotAppliedException
:
_.F2<Integer, Integer, Integer> divide1 = new _.F1<Integer, Integer, Integer>() { @Override public int apply(int n, int d) { if (d == 0) return NotAppliedException(); return n/d; } }In the above example thrown out
NotAppliedException
when divider is zero is
faster than do the calculation directly and let Java thrown outConstructor and Description |
---|
NotAppliedException() |
doFillInStackTrace, fillInStackTrace
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Copyright © 2016. All Rights Reserved.