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

Side by Side Diff: components/sync/android/java/src/org/chromium/components/sync/signin/AuthException.java

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 months 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.sync.signin; 5 package org.chromium.components.sync.signin;
6 6
7 /** 7 /**
8 * AuthException abstracts away authenticator specific exceptions behind a singl e interface. 8 * AuthException abstracts away authenticator specific exceptions behind a singl e interface.
9 * It is used for passing information that is useful for better handling of erro rs. 9 * It is used for passing information that is useful for better handling of erro rs.
10 */ 10 */
11 public class AuthException extends Exception { 11 public class AuthException extends Exception {
12 private final boolean mIsTransientError; 12 private final boolean mIsTransientError;
13 13
14 /** 14 /**
15 * A simple constructor that stores all the error handling information and m akes it available to 15 * A simple constructor that stores all the error handling information and m akes it available to
16 * the handler. 16 * the handler.
17 * @param isTransientError Whether the error is transient and we can retry. 17 * @param isTransientError Whether the error is transient and we can retry.
18 * Thus, a user recoverable error is not transient, since it requires explic it user handling 18 * Thus, a user recoverable error is not transient, since it requires explic it user handling
19 * before retry. 19 * before retry.
20 */ 20 */
21 public AuthException(boolean isTransientError, Exception exception) { 21 public AuthException(boolean isTransientError, Exception exception) {
22 super(exception); 22 super(exception);
23 assert !isTransientError; 23 assert !isTransientError;
24 mIsTransientError = isTransientError; 24 mIsTransientError = isTransientError;
25 } 25 }
26 26
27 /** 27 /**
28 * @return Whether the error is transient and we can retry. 28 * @return Whether the error is transient and we can retry.
29 */ 29 */
30 public boolean isTransientError() { 30 public boolean isTransientError() {
31 return mIsTransientError; 31 return mIsTransientError;
32 } 32 }
33 } 33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698