From 2b2a47a0086eab52b09e5425e75cafb488e51074 Mon Sep 17 00:00:00 2001 From: Maurice Laveaux Date: Thu, 22 May 2014 14:47:03 +0200 Subject: Updated the Requesters to throw RateLimitException. * The exception contains the reset timestamp in unix time. --- src/io/RateLimitException.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/io/RateLimitException.java (limited to 'src/io/RateLimitException.java') diff --git a/src/io/RateLimitException.java b/src/io/RateLimitException.java new file mode 100644 index 0000000..2bb2624 --- /dev/null +++ b/src/io/RateLimitException.java @@ -0,0 +1,18 @@ +package io; + +/** + * The exception that will be thrown when a ratelimit has been hit. + * + * @author Maurice Laveaux + */ +public class RateLimitException extends Exception { + private final long rateLimitReset; + + public RateLimitException(long resetTime) { + rateLimitReset = resetTime; + } + + public long getResetTime() { + return rateLimitReset; + } +} -- cgit v1.2.1