Skip to content

fix: replace silent pass with warnings in template loading - #21

Merged
codeasier merged 2 commits into
mainfrom
fix/template-loading-warnings
Apr 17, 2026
Merged

codeasier merged 2 commits into
mainfrom
fix/template-loading-warnings

Conversation

@codeasier

Copy link
Copy Markdown
Owner

📝 Description

Replace silent except Exception: pass blocks with warnings.warn() in both registry.py and executor.py template loading code.

Previously, corrupted or malformed YAML templates would silently disappear. Now a warning is emitted so users and developers can see template loading failures.

🔗 Related Issue

Fixes #13

🧪 Testing

  • Tests pass — no test behavior changed (only warning output added)
  • Manual testing completed

✅ Checklist

  • Code follows project guidelines
  • No new warnings introduced (no new warnings beyond the intended ones)
  • Changes tested locally

codeasier added 2 commits April 17, 2026 20:49
YAML template loading failures were silently swallowed by bare
except Exception: pass blocks. Corrupted or malformed templates
would disappear without any indication. Now warnings.warn() is
used so failures are visible to users and developers.

Closes #13
@codeasier
codeasier merged commit f1b6fdd into main Apr 17, 2026
5 checks passed
@codeasier
codeasier deleted the fix/template-loading-warnings branch April 17, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] 模板加载静默失败 — except Exception: pass 吞掉所有错误

1 participant