Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: components/cronet/android/java/src/org/chromium/net/UrlRequestException.java

Issue 586143002: Initial implementation of Cronet Async API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 * 10 * Exception after UrlRequest start. Could be reported by network stack, in
11 * which case netError() will contain native error code.
11 */ 12 */
12 public class UrlRequestException extends IOException { 13 public class UrlRequestException extends IOException {
14 /** Net error code if exception is reported by native. */
15 final int mNetError;
16
17 UrlRequestException(String message, Throwable cause) {
18 super(message, cause);
19 mNetError = 0;
20 }
21
22 UrlRequestException(String message, int netError) {
23 super(message, null);
24 mNetError = netError;
25 }
26
27 /** @return Error code if exception is reported by native. */
28 public int netError() {
29 return mNetError;
30 }
13 } 31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698