Skip to content

Commit 1fca33a

Browse files
committed
🐛 refine exception handling in transporter for unexpected sqlglot failures
1 parent 309d037 commit 1fca33a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mysql_to_sqlite3/transporter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def _transpile_mysql_expr_to_sqlite(cls, expr_sql: str) -> t.Optional[str]:
318318
return tree.sql(dialect="sqlite")
319319
except (ParseError, ValueError):
320320
return None
321-
except Exception: # pragma: no cover
321+
except (AttributeError, TypeError): # pragma: no cover - unexpected sqlglot failure
322322
logging.getLogger(cls.__name__ if hasattr(cls, "__name__") else "MySQLtoSQLite").debug(
323323
"sqlglot failed to transpile expr: %r", expr_sql
324324
)

0 commit comments

Comments
 (0)