Skip to content

Commit

Permalink
Add warning on encapsulation error
Browse files Browse the repository at this point in the history
  • Loading branch information
shunichironomura committed Jun 29, 2024
1 parent 4855dac commit 6d2ad3d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions capsula/encapsulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import queue
import threading
import warnings
from collections import OrderedDict
from itertools import chain
from typing import TYPE_CHECKING, Any, Tuple, Union
Expand Down Expand Up @@ -92,6 +93,7 @@ def encapsulate(self) -> Capsule:
except Exception as e: # noqa: PERF203
if capsule_item.abort_on_error:
raise
warnings.warn(f"Error occurred during encapsulation of {key}: {e}. Skipping.", stacklevel=3)

Check warning on line 96 in capsula/encapsulator.py

View check run for this annotation

Codecov / codecov/patch

capsula/encapsulator.py#L96

Added line #L96 was not covered by tests
fails[key] = ExceptionInfo.from_exception(e)
return Capsule(data, fails)

Expand Down

0 comments on commit 6d2ad3d

Please sign in to comment.