According to Oracle, Java’s rangeCheck is a formidable accomplishment. Here it is in LOLCODE:
Example usage:
123456789101112131415161718192021
I HAS A RESULT
BTW expected output -> `ILLEGAL ARGUMENT: FROMINDEX(5) > TOINDEX(4)`
RESULT R RANGECHECK 10 5 4
RESULT, O RLY?
YA RLY, VISIBLE RESULT, OIC
BTW expected output -> `INDEX OUT OF RANGE: -1`
RESULT R RANGECHECK 10 -1 4
RESULT, O RLY?
YA RLY, VISIBLE RESULT, OIC
BTW expected output -> `INDEX OUT OF RANGE: 40`
RESULT R RANGECHECK 10 5 40
RESULT, O RLY?
YA RLY, VISIBLE RESULT, OIC
BTW expected output -> none
RESULT R RANGECHECK 10 4 9
RESULT, O RLY?
YA RLY, VISIBLE RESULT, OIC