Revision: 10065
          http://sourceforge.net/p/languagetool/code/10065
Author:   dnaber
Date:     2013-05-10 21:10:59 +0000 (Fri, 10 May 2013)
Log Message:
-----------
don't throw exception on too many requests, the stacktrace doesn't really help 
us and only fills up the log file

Modified Paths:
--------------
    
trunk/languagetool/languagetool-server/src/main/java/org/languagetool/server/LanguageToolHttpHandler.java

Modified: 
trunk/languagetool/languagetool-server/src/main/java/org/languagetool/server/LanguageToolHttpHandler.java
===================================================================
--- 
trunk/languagetool/languagetool-server/src/main/java/org/languagetool/server/LanguageToolHttpHandler.java
   2013-05-10 21:09:29 UTC (rev 10064)
+++ 
trunk/languagetool/languagetool-server/src/main/java/org/languagetool/server/LanguageToolHttpHandler.java
   2013-05-10 21:10:59 UTC (rev 10065)
@@ -96,7 +96,8 @@
                 " denied - too many requests. Allowed maximum requests: " + 
requestLimiter.getRequestLimit() +
                 " requests per " + 
requestLimiter.getRequestLimitPeriodInSeconds() + " seconds";
         sendError(httpExchange, HttpURLConnection.HTTP_FORBIDDEN, 
errorMessage);
-        throw new RuntimeException(errorMessage);
+        print(errorMessage);
+        return;
       }
       final Map<String, String> parameters = getRequestQuery(httpExchange, 
requestedUri);
       if (allowedIps == null || allowedIps.contains(remoteAddress)) {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits

Reply via email to