mobile/android/base/tokenserver/TokenServerException.java

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 package org.mozilla.gecko.tokenserver;
michael@0 6
michael@0 7 import java.util.List;
michael@0 8
michael@0 9 import org.mozilla.gecko.sync.ExtendedJSONObject;
michael@0 10
michael@0 11 public class TokenServerException extends Exception {
michael@0 12 private static final long serialVersionUID = 7185692034925819696L;
michael@0 13
michael@0 14 public final List<ExtendedJSONObject> errors;
michael@0 15
michael@0 16 public TokenServerException(List<ExtendedJSONObject> errors) {
michael@0 17 super();
michael@0 18 this.errors = errors;
michael@0 19 }
michael@0 20
michael@0 21 public TokenServerException(List<ExtendedJSONObject> errors, String string) {
michael@0 22 super(string);
michael@0 23 this.errors = errors;
michael@0 24 }
michael@0 25
michael@0 26 public TokenServerException(List<ExtendedJSONObject> errors, Throwable e) {
michael@0 27 super(e);
michael@0 28 this.errors = errors;
michael@0 29 }
michael@0 30
michael@0 31 public static class TokenServerConditionsRequiredException extends TokenServerException {
michael@0 32 private static final long serialVersionUID = 7578072663150608399L;
michael@0 33
michael@0 34 public final ExtendedJSONObject conditionUrls;
michael@0 35
michael@0 36 public TokenServerConditionsRequiredException(ExtendedJSONObject urls) {
michael@0 37 super(null);
michael@0 38 this.conditionUrls = urls;
michael@0 39 }
michael@0 40 }
michael@0 41
michael@0 42 public static class TokenServerInvalidCredentialsException extends TokenServerException {
michael@0 43 private static final long serialVersionUID = 7578072663150608398L;
michael@0 44
michael@0 45 public TokenServerInvalidCredentialsException(List<ExtendedJSONObject> errors) {
michael@0 46 super(errors);
michael@0 47 }
michael@0 48
michael@0 49 public TokenServerInvalidCredentialsException(List<ExtendedJSONObject> errors, String message) {
michael@0 50 super(errors, message);
michael@0 51 }
michael@0 52 }
michael@0 53
michael@0 54 public static class TokenServerUnknownServiceException extends TokenServerException {
michael@0 55 private static final long serialVersionUID = 7578072663150608397L;
michael@0 56
michael@0 57 public TokenServerUnknownServiceException(List<ExtendedJSONObject> errors) {
michael@0 58 super(errors);
michael@0 59 }
michael@0 60
michael@0 61 public TokenServerUnknownServiceException(List<ExtendedJSONObject> errors, String message) {
michael@0 62 super(errors, message);
michael@0 63 }
michael@0 64 }
michael@0 65
michael@0 66 public static class TokenServerMalformedRequestException extends TokenServerException {
michael@0 67 private static final long serialVersionUID = 7578072663150608396L;
michael@0 68
michael@0 69 public TokenServerMalformedRequestException(List<ExtendedJSONObject> errors) {
michael@0 70 super(errors);
michael@0 71 }
michael@0 72
michael@0 73 public TokenServerMalformedRequestException(List<ExtendedJSONObject> errors, String message) {
michael@0 74 super(errors, message);
michael@0 75 }
michael@0 76 }
michael@0 77
michael@0 78 public static class TokenServerMalformedResponseException extends TokenServerException {
michael@0 79 private static final long serialVersionUID = 7578072663150608395L;
michael@0 80
michael@0 81 public TokenServerMalformedResponseException(List<ExtendedJSONObject> errors, String message) {
michael@0 82 super(errors, message);
michael@0 83 }
michael@0 84
michael@0 85 public TokenServerMalformedResponseException(List<ExtendedJSONObject> errors, Throwable e) {
michael@0 86 super(errors, e);
michael@0 87 }
michael@0 88 }
michael@0 89 }

mercurial