Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.net; | 5 package org.chromium.net; |
| 6 | 6 |
| 7 import java.io.IOException; | 7 import java.io.IOException; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Exception passed to {@link UrlRequest.Callback#onFailed UrlRequest.Callback.o nFailed()} when: | 10 * Exception passed to {@link UrlRequest.Callback#onFailed UrlRequest.Callback.o nFailed()} when: |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 default: | 154 default: |
| 155 return false; | 155 return false; |
| 156 case ERROR_NETWORK_CHANGED: | 156 case ERROR_NETWORK_CHANGED: |
| 157 case ERROR_TIMED_OUT: | 157 case ERROR_TIMED_OUT: |
| 158 case ERROR_CONNECTION_CLOSED: | 158 case ERROR_CONNECTION_CLOSED: |
| 159 case ERROR_CONNECTION_TIMED_OUT: | 159 case ERROR_CONNECTION_TIMED_OUT: |
| 160 case ERROR_CONNECTION_RESET: | 160 case ERROR_CONNECTION_RESET: |
| 161 return true; | 161 return true; |
| 162 } | 162 } |
| 163 } | 163 } |
| 164 | |
| 165 @Override | |
| 166 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
| |
| 167 StringBuilder b = new StringBuilder(); | |
| 168 b.append(super.toString()); | |
| 169 b.append(", ErrorCode=").append(mErrorCode); | |
| 170 if (mCronetInternalErrorCode != 0) { | |
| 171 b.append(", InternalErrorCode=").append(mCronetInternalErrorCode); | |
| 172 } | |
| 173 b.append(", Retriable=").append(immediatelyRetryable()); | |
| 174 if (getCause() != null) { | |
| 175 b.append(", Cause=").append(getCause().toString()); | |
| 176 } | |
| 177 return b.toString(); | |
| 178 } | |
| 164 } | 179 } |
| OLD | NEW |