Skip to content

Commit

Permalink
last attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Feb 2, 2025
1 parent c71f87b commit 26f5a09
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions narwhals/_polars/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,8 @@ def catch_polars_exception(exception: Exception) -> NarwhalsError | Exception:
):
# Old versions of Polars didn't have PolarsError.
return NarwhalsError(str(exception))
if "polars.exceptions" in str(type(exception)):
# Last attempt...
return NarwhalsError(str(exception))
# Just return exception as-is.
return exception

0 comments on commit 26f5a09

Please sign in to comment.