exceptions_with_structure 1.0.1__tar.gz → 1.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: exceptions_with_structure
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: A standardized error class with ISO-8601 timestamps and machine-readable codes.
5
5
  Author-email: Vedansh Shetti <vedansh.shetti@gmail.com>
6
6
  License: EUPL-1.2
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "exceptions_with_structure"
3
- version = "1.0.1"
3
+ version = "1.0.2"
4
4
  description = "A standardized error class with ISO-8601 timestamps and machine-readable codes."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.8"
@@ -1,12 +1,12 @@
1
- from .utils import iso8601
2
-
3
- class StructuredException(Exception):
4
- def __init__(self, message: str, error_code: str):
5
- # Pass the message to the parent Exception class
6
- super().__init__(message)
7
-
8
- # Store your custom fields
9
- self.timestamp = iso8601()
10
- self.error_code = error_code
11
-
1
+ from .utils import iso8601
2
+
3
+ class StructuredException(Exception):
4
+ def __init__(self, message: str, error_code: str):
5
+ # Pass the message to the parent Exception class
6
+ super().__init__(message)
7
+
8
+ # Store your custom fields
9
+ self.timestamp = iso8601()
10
+ self.error_code = error_code
11
+
12
12
  __all__ = ["StructuredException"]
@@ -0,0 +1,3 @@
1
+ from .Exceptions import StructuredException;
2
+
3
+ __all__ = ["StructuredException"]