diff options
author | Maurice Laveaux <m.laveaux@student.tue.nl> | 2014-05-22 14:47:03 +0200 |
---|---|---|
committer | Maurice Laveaux <m.laveaux@student.tue.nl> | 2014-05-22 14:47:03 +0200 |
commit | 2b2a47a0086eab52b09e5425e75cafb488e51074 (patch) | |
tree | 5ea244f904d4a9ce9855133ec3df4f06f8b7c95a /src/io/RateLimitException.java | |
parent | b318cc755befd04f711c03f927789fc8c1a72216 (diff) | |
download | TwitterDataAnalytics-2b2a47a0086eab52b09e5425e75cafb488e51074.tar.gz |
Updated the Requesters to throw RateLimitException.
* The exception contains the reset timestamp in unix time.
Diffstat (limited to 'src/io/RateLimitException.java')
-rw-r--r-- | src/io/RateLimitException.java | 18 |
1 files changed, 18 insertions, 0 deletions
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; + } +} |