reydb 1.1.30__py3-none-any.whl → 1.1.31__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
@@ -232,15 +232,17 @@ class DatabaseLog(DatabaseBase):
|
|
232
232
|
self,
|
233
233
|
func: Callable[..., T] | None = None,
|
234
234
|
*,
|
235
|
-
note: str | None = None
|
235
|
+
note: str | None = None,
|
236
|
+
filter_exc : BaseException | tuple[BaseException, ...] = None
|
236
237
|
) -> T | Callable[[Callable[..., T]], Callable[..., T]]:
|
237
238
|
"""
|
238
|
-
Decorator, insert exception information into the table of database.
|
239
|
+
Decorator, insert exception information into the table of database, throw exception.
|
239
240
|
|
240
241
|
Parameters
|
241
242
|
----------
|
242
243
|
func : Function.
|
243
244
|
note : Exception note.
|
245
|
+
filter_exc : Exception type of not inserted, but still throw exception.
|
244
246
|
|
245
247
|
Returns
|
246
248
|
-------
|
@@ -268,6 +270,10 @@ class DatabaseLog(DatabaseBase):
|
|
268
270
|
>>> func(*args, **kwargs)
|
269
271
|
"""
|
270
272
|
|
273
|
+
# Handle parameter.
|
274
|
+
if issubclass(filter_exc, BaseException):
|
275
|
+
filter_exc = (filter_exc,)
|
276
|
+
|
271
277
|
|
272
278
|
def _wrap(func_: Callable[..., T]) -> Callable[..., T]:
|
273
279
|
"""
|
@@ -305,7 +311,11 @@ class DatabaseLog(DatabaseBase):
|
|
305
311
|
# Log.
|
306
312
|
except BaseException:
|
307
313
|
_, exc, stack = catch_exc()
|
308
|
-
|
314
|
+
|
315
|
+
## Filter.
|
316
|
+
if type(exc) not in filter_exc:
|
317
|
+
self.error(exc, stack, note)
|
318
|
+
|
309
319
|
raise
|
310
320
|
|
311
321
|
return result
|
@@ -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=uB7k_JBTxDPzas9cmsR3-nmjFBq7l3N4xEEbACj73i4,9797
|
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.31.dist-info/METADATA,sha256=RAnCVfzN3wJjpC9kG5n5R2i809DxqslcFvAhTBryJjc,1550
|
13
|
+
reydb-1.1.31.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
14
|
+
reydb-1.1.31.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
15
|
+
reydb-1.1.31.dist-info/RECORD,,
|
File without changes
|
File without changes
|