reydb 1.1.32__py3-none-any.whl → 1.1.33__py3-none-any.whl
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.
reydb/rlog.py
CHANGED
@@ -233,7 +233,7 @@ class DatabaseLog(DatabaseBase):
|
|
233
233
|
func: Callable[..., T] | None = None,
|
234
234
|
*,
|
235
235
|
note: str | None = None,
|
236
|
-
|
236
|
+
filter_type : BaseException | tuple[BaseException, ...] = Exit
|
237
237
|
) -> T | Callable[[Callable[..., T]], Callable[..., T]]:
|
238
238
|
"""
|
239
239
|
Decorator, insert exception information into the table of database, throw exception.
|
@@ -242,7 +242,7 @@ class DatabaseLog(DatabaseBase):
|
|
242
242
|
----------
|
243
243
|
func : Function.
|
244
244
|
note : Exception note.
|
245
|
-
|
245
|
+
filter_type : Exception type of not inserted, but still throw exception.
|
246
246
|
|
247
247
|
Returns
|
248
248
|
-------
|
@@ -271,8 +271,8 @@ class DatabaseLog(DatabaseBase):
|
|
271
271
|
"""
|
272
272
|
|
273
273
|
# Handle parameter.
|
274
|
-
if issubclass(
|
275
|
-
|
274
|
+
if issubclass(filter_type, BaseException):
|
275
|
+
filter_type = (filter_type,)
|
276
276
|
|
277
277
|
|
278
278
|
def _wrap(func_: Callable[..., T]) -> Callable[..., T]:
|
@@ -313,7 +313,10 @@ class DatabaseLog(DatabaseBase):
|
|
313
313
|
_, exc, stack = catch_exc()
|
314
314
|
|
315
315
|
## Filter.
|
316
|
-
|
316
|
+
for type_ in filter_type:
|
317
|
+
if isinstance(exc, type_):
|
318
|
+
break
|
319
|
+
else:
|
317
320
|
self.error(exc, stack, note)
|
318
321
|
|
319
322
|
raise
|
@@ -7,9 +7,9 @@ reydb/rdb.py,sha256=hjWwB778jxBoTgx2lgs6n1NZMJA0Hbg4HHdXE57hZiY,61841
|
|
7
7
|
reydb/rexec.py,sha256=dGdRkG1XR0Z66T0r4nPCSdQzSRWc_Q3t6TPSSrDTIxY,9042
|
8
8
|
reydb/rfile.py,sha256=7g6hPBz33p-mkGFc6LEmL2hpFes-LM-AWQ0SxgJe2BI,15254
|
9
9
|
reydb/rinfo.py,sha256=KXTkcpTGAD3p9RVKKcnmc_FjJtiKRPk-K5ZepPOnphQ,15253
|
10
|
-
reydb/rlog.py,sha256=
|
10
|
+
reydb/rlog.py,sha256=EpKPIjI_cAmXzFUs3D8ZC-JUylAPodm9LfXqRiLGEG0,9916
|
11
11
|
reydb/rparam.py,sha256=3BGDBD8QshOf2J70ZJ6LJ9PiH-1ZU3ruZwoE0bN6OOw,7017
|
12
|
-
reydb-1.1.
|
13
|
-
reydb-1.1.
|
14
|
-
reydb-1.1.
|
15
|
-
reydb-1.1.
|
12
|
+
reydb-1.1.33.dist-info/METADATA,sha256=AW2-MON8LlkmeGeY5zCbAOLtGtMhHYDjcca_Ak5msls,1550
|
13
|
+
reydb-1.1.33.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
14
|
+
reydb-1.1.33.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
15
|
+
reydb-1.1.33.dist-info/RECORD,,
|
File without changes
|
File without changes
|