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.

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

mercurial