Mercurial Hosting > luan
comparison src/luan/modules/url/LuanUrl.java @ 1509:0ba144491a42
lucene.backup zip
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 17 May 2020 14:29:33 -0600 |
parents | 8ab2f0fc3829 |
children | fb5be0e8ca54 |
comparison
equal
deleted
inserted
replaced
1508:86c5e7000ecf | 1509:0ba144491a42 |
---|---|
15 import java.security.NoSuchAlgorithmException; | 15 import java.security.NoSuchAlgorithmException; |
16 import java.util.Map; | 16 import java.util.Map; |
17 import java.util.HashMap; | 17 import java.util.HashMap; |
18 import java.util.List; | 18 import java.util.List; |
19 import java.util.Base64; | 19 import java.util.Base64; |
20 import goodjava.io.IoUtils; | |
20 import goodjava.parser.ParseException; | 21 import goodjava.parser.ParseException; |
21 import luan.Luan; | 22 import luan.Luan; |
22 import luan.LuanTable; | 23 import luan.LuanTable; |
23 import luan.LuanJavaFunction; | 24 import luan.LuanJavaFunction; |
24 import luan.LuanException; | 25 import luan.LuanException; |
320 String responseMessage = httpCon.getResponseMessage(); | 321 String responseMessage = httpCon.getResponseMessage(); |
321 InputStream is = httpCon.getErrorStream(); | 322 InputStream is = httpCon.getErrorStream(); |
322 if( is == null ) | 323 if( is == null ) |
323 throw e; | 324 throw e; |
324 Reader in = new InputStreamReader(is); | 325 Reader in = new InputStreamReader(is); |
325 String msg = Utils.readAll(in); | 326 String msg = IoUtils.readAll(in); |
326 in.close(); | 327 in.close(); |
327 LuanException le = new LuanException(msg,e); | 328 LuanException le = new LuanException(msg,e); |
328 le.put("response_code",responseCode); | 329 le.put("response_code",responseCode); |
329 le.put("response_message",responseMessage); | 330 le.put("response_message",responseMessage); |
330 throw le; | 331 throw le; |