|
54 | 54 | import java.util.Locale; |
55 | 55 | import java.util.Map; |
56 | 56 | import java.util.NoSuchElementException; |
57 | | -import java.util.logging.Level; |
58 | 57 | import java.util.logging.Logger; |
59 | 58 | import java.util.regex.Matcher; |
60 | 59 | import java.util.regex.Pattern; |
61 | 60 | import java.util.zip.GZIPInputStream; |
62 | 61 |
|
63 | | -import static java.util.Arrays.*; |
64 | | -import static java.util.logging.Level.*; |
65 | | -import static org.apache.commons.lang.StringUtils.*; |
66 | | -import static org.kohsuke.github.GitHub.*; |
| 62 | +import static java.util.Arrays.asList; |
| 63 | +import static java.util.logging.Level.FINE; |
| 64 | +import static java.util.logging.Level.FINEST; |
| 65 | +import static java.util.logging.Level.INFO; |
| 66 | +import static org.apache.commons.lang.StringUtils.defaultString; |
| 67 | +import static org.kohsuke.github.GitHub.MAPPER; |
67 | 68 |
|
68 | 69 | /** |
69 | 70 | * A builder pattern for making HTTP call and parsing its output. |
@@ -452,7 +453,7 @@ private boolean isMethodWithBody() { |
452 | 453 | try { |
453 | 454 | return new PagingIterator<T>(type, tailApiUrl, root.getApiURL(s.toString())); |
454 | 455 | } catch (IOException e) { |
455 | | - throw new Error(e); |
| 456 | + throw new GHException("Unable to build github Api URL",e); |
456 | 457 | } |
457 | 458 | } |
458 | 459 |
|
@@ -513,7 +514,7 @@ private void fetch() { |
513 | 514 | } |
514 | 515 | } |
515 | 516 | } catch (IOException e) { |
516 | | - throw new Error(e); |
| 517 | + throw new GHException("Failed to retrieve "+url); |
517 | 518 | } |
518 | 519 | } |
519 | 520 |
|
|
0 commit comments