FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
GitPython/gitdb/gitdb/exc.py at 3.1.57 · gitpython-developers/GitPython · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
gitpython-developers
/
GitPython
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
989
Star
5.2k
Code
Issues
8
Pull requests
2
Discussions
Actions
Security and quality
34
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
GitPython
/
gitdb
/
gitdb
/
exc.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
57 lines (39 loc) · 1.46 KB
Breadcrumbs
GitPython
/
gitdb
/
gitdb
/
exc.py
Copy path
File metadata and controls
57 lines (39 loc) · 1.46 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Copyright (C) 2010, 2011 Sebastian Thiel (byronimo@gmail.com) and contributors
#
# This module is part of GitDB and is released under
# the New BSD License: https://opensource.org/license/bsd-3-clause/
"""Module with common exceptions"""
from
gitdb
.
util
import
to_hex_sha
__all__
=
[
'AmbiguousObjectName'
,
'BadName'
,
'BadObject'
,
'BadObjectType'
,
'InvalidDBRoot'
,
'ODBError'
,
'ParseError'
,
'UnsupportedOperation'
,
'to_hex_sha'
,
]
class
ODBError
(
Exception
):
"""All errors thrown by the object database"""
class
InvalidDBRoot
(
ODBError
):
"""Thrown if an object database cannot be initialized at the given path"""
class
BadObject
(
ODBError
):
"""The object with the given SHA does not exist. Instantiate with the
failed sha"""
def
__str__
(
self
):
return
"BadObject: %s"
%
to_hex_sha
(
self
.
args
[
0
])
class
BadName
(
ODBError
):
"""A name provided to rev_parse wasn't understood"""
def
__str__
(
self
):
return
"Ref '%s' did not resolve to an object"
%
self
.
args
[
0
]
class
ParseError
(
ODBError
):
"""Thrown if the parsing of a file failed due to an invalid format"""
class
AmbiguousObjectName
(
ODBError
):
"""Thrown if a possibly shortened name does not uniquely represent a single object
in the database"""
class
BadObjectType
(
ODBError
):
"""The object had an unsupported type"""
class
UnsupportedOperation
(
ODBError
):
"""Thrown if the given operation cannot be supported by the object database"""
Back
|
FazBrowse Home
|
New Git URL