blob: b3a7d13ab926853a43d1646eaaf665e006358957 [file] [log] [blame]
Joe Gregorio3ad5e9a2010-12-09 15:01:04 -05001#!/usr/bin/python2.4
2#
3# Copyright 2010 Google Inc. All Rights Reserved.
4
5"""Errors for the library.
6
7All exceptions defined by the library
8should be defined in this file.
9"""
10
11__author__ = 'jcgregorio@google.com (Joe Gregorio)'
12
13
14class Error(Exception):
15 """Base error for this module."""
16 pass
17
18
19class HttpError(Error):
20 """HTTP data was invalid or unexpected."""
21
22 def __init__(self, resp, detail):
23 self.resp = resp
24 self.detail = detail
25
26 def __str__(self):
27 return self.detail
28
29
30class UnknownLinkType(Error):
31 """Link type unknown or unexpected."""
32 pass