Skip to content

Commit f2ecb00

Browse files
committed
Move PyEthPMError -> PyEthPMException, and ENSError -> ENSException
1 parent 80b7701 commit f2ecb00

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

ens/exceptions.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import idna
22

33

4-
class ENSError(Exception):
4+
class ENSException(Exception):
55
"""
66
Base class for all ENS Errors
77
"""
88

99
pass
1010

1111

12-
class AddressMismatch(ENSError):
12+
class AddressMismatch(ENSException):
1313
"""
1414
In order to set up reverse resolution correctly, the ENS name should first
1515
point to the address. This exception is raised if the name does
@@ -19,7 +19,7 @@ class AddressMismatch(ENSError):
1919
pass
2020

2121

22-
class InvalidName(idna.IDNAError, ENSError):
22+
class InvalidName(idna.IDNAError, ENSException):
2323
"""
2424
This exception is raised if the provided name does not meet
2525
the syntax standards specified in `EIP 137 name syntax
@@ -31,7 +31,7 @@ class InvalidName(idna.IDNAError, ENSError):
3131
pass
3232

3333

34-
class UnauthorizedError(ENSError):
34+
class UnauthorizedError(ENSException):
3535
"""
3636
Raised if the sending account is not the owner of the name
3737
you are trying to modify. Make sure to set ``from`` in the
@@ -41,7 +41,7 @@ class UnauthorizedError(ENSError):
4141
pass
4242

4343

44-
class UnownedName(ENSError):
44+
class UnownedName(ENSException):
4545
"""
4646
Raised if you are trying to modify a name that no one owns.
4747
@@ -52,47 +52,47 @@ class UnownedName(ENSError):
5252
pass
5353

5454

55-
class ResolverNotFound(ENSError):
55+
class ResolverNotFound(ENSException):
5656
"""
5757
Raised if no resolver was found for the name you are trying to resolve.
5858
"""
5959

6060
pass
6161

6262

63-
class UnsupportedFunction(ENSError):
63+
class UnsupportedFunction(ENSException):
6464
"""
6565
Raised if a resolver does not support a particular method.
6666
"""
6767

6868
pass
6969

7070

71-
class BidTooLow(ENSError):
71+
class BidTooLow(ENSException):
7272
"""
7373
Raised if you bid less than the minimum amount
7474
"""
7575

7676
pass
7777

7878

79-
class InvalidBidHash(ENSError):
79+
class InvalidBidHash(ENSException):
8080
"""
8181
Raised if you supply incorrect data to generate the bid hash.
8282
"""
8383

8484
pass
8585

8686

87-
class InvalidLabel(ENSError):
87+
class InvalidLabel(ENSException):
8888
"""
8989
Raised if you supply an invalid label
9090
"""
9191

9292
pass
9393

9494

95-
class OversizeTransaction(ENSError):
95+
class OversizeTransaction(ENSException):
9696
"""
9797
Raised if a transaction you are trying to create would cost so
9898
much gas that it could not fit in a block.
@@ -103,7 +103,7 @@ class OversizeTransaction(ENSError):
103103
pass
104104

105105

106-
class UnderfundedBid(ENSError):
106+
class UnderfundedBid(ENSException):
107107
"""
108108
Raised if you send less wei with your bid than you declared
109109
as your intent to bid.

ethpm/exceptions.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
class PyEthPMError(Exception):
1+
class PyEthPMException(Exception):
22
"""
33
Base class for all Py-EthPM errors.
44
"""
55

66
pass
77

88

9-
class InsufficientAssetsError(PyEthPMError):
9+
class InsufficientAssetsError(PyEthPMException):
1010
"""
1111
Raised when a Manifest or Package does not contain the required
1212
assets to do something.
@@ -15,39 +15,39 @@ class InsufficientAssetsError(PyEthPMError):
1515
pass
1616

1717

18-
class EthPMValidationError(PyEthPMError):
18+
class EthPMValidationError(PyEthPMException):
1919
"""
2020
Raised when something does not pass a validation check.
2121
"""
2222

2323
pass
2424

2525

26-
class CannotHandleURI(PyEthPMError):
26+
class CannotHandleURI(PyEthPMException):
2727
"""
2828
Raised when the given URI cannot be served by any of the available backends.
2929
"""
3030

3131
pass
3232

3333

34-
class FailureToFetchIPFSAssetsError(PyEthPMError):
34+
class FailureToFetchIPFSAssetsError(PyEthPMException):
3535
"""
3636
Raised when an attempt to fetch a Package's assets via IPFS failed.
3737
"""
3838

3939
pass
4040

4141

42-
class BytecodeLinkingError(PyEthPMError):
42+
class BytecodeLinkingError(PyEthPMException):
4343
"""
4444
Raised when an attempt to link a contract factory's bytecode failed.
4545
"""
4646

4747
pass
4848

4949

50-
class ManifestBuildingError(PyEthPMError):
50+
class ManifestBuildingError(PyEthPMException):
5151
"""
5252
Raised when an attempt to build a manifest failed.
5353
"""

0 commit comments

Comments
 (0)