Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/omaha/RequestFailureException.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/RequestFailureException.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/RequestFailureException.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..62ecd5f25081fe44e319e89e7b2355916c00bd78 |
| --- /dev/null |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/RequestFailureException.java |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
|
nyquist
2014/01/23 00:54:02
How do you feel about changing all of these header
gone
2014/01/24 07:43:12
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +package org.chromium.chrome.browser.omaha; |
| + |
| +/** |
| + * Serves as a general exception for failed POST requests to the Omaha Update Server. |
| + */ |
| +public class RequestFailureException extends Exception { |
| + public static final int ERROR_UNDEFINED = 0; |
| + public static final int ERROR_MALFORMED_XML = 1; |
| + public static final int ERROR_PARSE_ROOT = 2; |
| + public static final int ERROR_PARSE_RESPONSE = 3; |
| + public static final int ERROR_PARSE_DAYSTART = 4; |
| + public static final int ERROR_PARSE_APP = 5; |
| + public static final int ERROR_PARSE_PING = 6; |
| + public static final int ERROR_PARSE_EVENT = 7; |
| + public static final int ERROR_PARSE_URLS = 8; |
| + public static final int ERROR_PARSE_UPDATECHECK = 9; |
| + public static final int ERROR_PARSE_MANIFEST = 10; |
| + |
| + public int errorCode = ERROR_UNDEFINED; |
| + |
| + public RequestFailureException(String message) { |
| + this(message, ERROR_UNDEFINED); |
| + } |
| + |
| + public RequestFailureException(String message, int error) { |
| + super(message); |
| + errorCode = error; |
| + } |
| + |
| + public RequestFailureException(String message, Throwable cause) { |
| + this(message, cause, ERROR_UNDEFINED); |
| + } |
| + |
| + public RequestFailureException(String message, Throwable cause, int error) { |
| + super(message, cause); |
| + errorCode = error; |
| + } |
| +} |