OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library expiration_exception; | 5 library expiration_exception; |
6 | 6 |
7 import 'dart:io'; | |
8 | |
9 import 'credentials.dart'; | 7 import 'credentials.dart'; |
10 | 8 |
11 /// An exception raised when attempting to use expired OAuth2 credentials. | 9 /// An exception raised when attempting to use expired OAuth2 credentials. |
12 class ExpirationException implements Exception { | 10 class ExpirationException implements Exception { |
13 /// The expired credentials. | 11 /// The expired credentials. |
14 final Credentials credentials; | 12 final Credentials credentials; |
15 | 13 |
16 /// Creates an ExpirationException. | 14 /// Creates an ExpirationException. |
17 ExpirationException(this.credentials); | 15 ExpirationException(this.credentials); |
18 | 16 |
19 /// Provides a string description of the ExpirationException. | 17 /// Provides a string description of the ExpirationException. |
20 String toString() => | 18 String toString() => |
21 "OAuth2 credentials have expired and can't be refreshed."; | 19 "OAuth2 credentials have expired and can't be refreshed."; |
22 } | 20 } |
OLD | NEW |