| OLD | NEW |
| 1 # Copyright 2016 The LUCI Authors. All rights reserved. | 1 # Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed under the Apache License, Version 2.0 | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # that can be found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 | 5 |
| 6 class InitializationError(Exception): | 6 class InitializationError(Exception): |
| 7 """Raised by RemoteClient.initialize on fatal errors.""" | 7 """Raised by RemoteClient.initialize on fatal errors.""" |
| 8 def __init__(self, last_error): | 8 def __init__(self, last_error): |
| 9 super(InitializationError, self).__init__('Failed to grab auth headers') | 9 super(InitializationError, self).__init__('Failed to grab auth headers') |
| 10 self.last_error = last_error | 10 self.last_error = last_error |
| 11 | 11 |
| 12 | 12 |
| 13 class BotCodeError(Exception): | 13 class BotCodeError(Exception): |
| 14 """Raised by RemoteClient.get_bot_code.""" | 14 """Raised by RemoteClient.get_bot_code.""" |
| 15 def __init__(self, new_zip, url, version): | 15 def __init__(self, new_zip, url, version): |
| 16 super(BotCodeError, self).__init__( | 16 super(BotCodeError, self).__init__( |
| 17 'Unable to download %s from %s; first tried version %s' % | 17 'Unable to download %s from %s; first tried version %s' % |
| 18 (new_zip, url, version)) | 18 (new_zip, url, version)) |
| 19 | 19 |
| 20 | 20 |
| 21 class InternalError(Exception): | 21 class InternalError(Exception): |
| 22 """Raised on unrecoverable errors that abort task with 'internal error'.""" | 22 """Raised on unrecoverable errors that abort task with 'internal error'.""" |
| 23 | 23 |
| 24 | 24 |
| 25 class PollError(Exception): | 25 class PollError(Exception): |
| 26 """Raised on unrecoverable errors when in RemoteClient.poll.""" | 26 """Raised on unrecoverable errors in RemoteClient.poll.""" |
| 27 |
| 28 |
| 29 class MintOAuthTokenError(Exception): |
| 30 """Raised on unrecoverable errors in RemoteClient.mint_oauth_token.""" |
| OLD | NEW |