<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Exception-Chaining on 每日拍拍</title>
    <link>https://dailypypy.org/tags/exception-chaining/</link>
    <description>Recent content in Exception-Chaining on 每日拍拍</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-tw</language>
    <copyright>© 2026 每日拍拍</copyright>
    <lastBuildDate>Sun, 25 Oct 2026 12:10:00 +0800</lastBuildDate><atom:link href="https://dailypypy.org/tags/exception-chaining/index.xml" rel="self" type="application/rss+xml" />
    <follow_challenge>
      <feedId>155076163427069952</feedId>
      <userId>154825760438254592</userId>
    </follow_challenge>
    
    
    <item>
      <title>Rich Traceback 實戰：例外鏈、敏感資料遮蔽與 CLI 退出契約</title>
      <link>https://dailypypy.org/learn/python-rich-traceback-cli-errors/</link>
      <pubDate>Sun, 25 Oct 2026 12:10:00 +0800</pubDate>
      
      <guid>https://dailypypy.org/learn/python-rich-traceback-cli-errors/</guid>
      <description>&lt;!---
1440x768
prompt: masterpiece, best quality, highres, clean anime illustration, japanese anime style, soft shading, flat color design, 1girl, black hair, green eyes, white off-shoulder shirt, black short skirt, eye-level three-quarter upper body, standing with arms crossed comfortably, playful determined closed-mouth smile, looking at viewer, pastel pale coral background, neat composition, detailed eyes, cute and smart vibe, minimal background, polished illustration, no text
negative prompt: worst quality, bad eye, bad hand, extra limbs, manga, multiple views, monochrome, text, signature
dedup note: Narrow follow-up to ../python-rich-typer-cli/: that article owns general CLI UX and simple error panels. This article owns exception-cause preservation, public-versus-private diagnostics, locals/message/source/notes privacy boundaries, stderr-only tracebacks, stable exits and real subprocess tests. ../python-rich/ owns widgets; ../python-rich-logging-dashboard/ owns continuous Live/Layout monitoring. Current 201-post source inventory and full nearest articles checked before drafting.
publication note: Required randomized display date retained; publishDate enables the morning release with buildFuture=false.
source check: Official Rich traceback/Console references and Python exception chaining/notes docs reviewed 2026-10-25; examples tested with Python 3.12 and Rich 15.0.0.
---&gt;

&lt;h2 class=&#34;relative group&#34;&gt;一. 前言：Traceback 漂亮了，Token 也跟著上鏡？ 
    &lt;div id=&#34;一-前言traceback-漂亮了token-也跟著上鏡&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;
    
    &lt;span
        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100&#34;&gt;
        &lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700&#34;
            style=&#34;text-decoration-line: none !important;&#34; href=&#34;#%e4%b8%80-%e5%89%8d%e8%a8%80traceback-%e6%bc%82%e4%ba%ae%e4%ba%86token-%e4%b9%9f%e8%b7%9f%e8%91%97%e4%b8%8a%e9%8f%a1&#34; aria-label=&#34;定位點&#34;&gt;#&lt;/a&gt;
    &lt;/span&gt;        
    
&lt;/h2&gt;
&lt;p&gt;拍拍君最近整理 CLI，遇到兩個看起來很小、實際很煩的問題。
第一個：錯誤訊息跑進 stdout，下一個程式讀 JSON 直接爆炸。
第二個：為了方便除錯打開區域變數，結果認證資料也被印進 CI log。&lt;/p&gt;</description>
      <media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://dailypypy.org/learn/python-rich-traceback-cli-errors/featured.png" />
    </item>
    
  </channel>
</rss>
