Chromium Code Reviews| Index: components/cronet/android/api/src/org/chromium/net/UrlRequestException.java |
| diff --git a/components/cronet/android/api/src/org/chromium/net/UrlRequestException.java b/components/cronet/android/api/src/org/chromium/net/UrlRequestException.java |
| index 8cbeafbc098441dbee4b469573a96e8d8c91f924..10bb7216c3982080c31bd61f7b6d3fb2391dd9d4 100644 |
| --- a/components/cronet/android/api/src/org/chromium/net/UrlRequestException.java |
| +++ b/components/cronet/android/api/src/org/chromium/net/UrlRequestException.java |
| @@ -161,4 +161,19 @@ public class UrlRequestException extends IOException { |
| return true; |
| } |
| } |
| + |
| + @Override |
| + public String toString() { |
|
Charles
2016/11/15 19:08:16
Usually the preferred way to do this would be to a
kapishnikov
2016/11/15 21:17:01
I cannot pass the augmented message to the superty
Charles
2016/11/15 21:38:22
Why can't you pass it to the supertype constructor
|
| + StringBuilder b = new StringBuilder(); |
| + b.append(super.toString()); |
| + b.append(", ErrorCode=").append(mErrorCode); |
| + if (mCronetInternalErrorCode != 0) { |
| + b.append(", InternalErrorCode=").append(mCronetInternalErrorCode); |
| + } |
| + b.append(", Retriable=").append(immediatelyRetryable()); |
| + if (getCause() != null) { |
| + b.append(", Cause=").append(getCause().toString()); |
| + } |
| + return b.toString(); |
| + } |
| } |