Skip to content

Commit 1086742

Browse files
committed
Rewrite all exceptions to more readable ones
Signed-off-by: chandr-andr (Kiselev Aleksandr) <chandr@chandr.net>
1 parent 66f2d0f commit 1086742

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

python/psqlpy/_internal/exceptions.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ class CursorFetchError(BaseCursorError):
5252
class UUIDValueConvertError(RustPSQLDriverPyBaseError):
5353
"""Error if it's impossible to convert py string UUID into rust UUID."""
5454

55-
class MacAddr6ConversionError(RustPSQLDriverPyBaseError):
56-
"""Error if cannot convert MacAddr6 string value to rust type."""
55+
class MacAddrConversionError(RustPSQLDriverPyBaseError):
56+
"""Error if cannot convert MacAddr string value to rust type."""
5757

5858
class RustToPyValueMappingError(RustPSQLDriverPyBaseError):
5959
"""Error if it is not possible to covert rust type to python.

python/psqlpy/exceptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
CursorCloseError,
1111
CursorFetchError,
1212
CursorStartError,
13-
MacAddr6ConversionError,
13+
MacAddrConversionError,
1414
PyToRustValueMappingError,
1515
RustPSQLDriverPyBaseError,
1616
RustToPyValueMappingError,
@@ -43,5 +43,5 @@
4343
"RustToPyValueMappingError",
4444
"PyToRustValueMappingError",
4545
"UUIDValueConvertError",
46-
"MacAddr6ConversionError",
46+
"MacAddrConversionError",
4747
]

src/exceptions/python_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ pub fn python_exceptions_module(py: Python<'_>, pymod: &Bound<'_, PyModule>) ->
194194
py.get_type_bound::<UUIDValueConvertError>(),
195195
)?;
196196
pymod.add(
197-
"MacAddr6ConversionError",
197+
"MacAddrConversionError",
198198
py.get_type_bound::<MacAddrConversionError>(),
199199
)?;
200200
Ok(())

0 commit comments

Comments
 (0)