<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ex-Info on PlumePHP</title><link>https://plumephp.com/tags/ex-info/</link><description>Recent content in Ex-Info on PlumePHP</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Tue, 29 Sep 2026 15:00:00 +0800</lastBuildDate><atom:link href="https://plumephp.com/tags/ex-info/index.xml" rel="self" type="application/rss+xml"/><item><title>Clojure 函数式错误处理：Result、异常与结构化错误</title><link>https://plumephp.com/clojure-error-handling-patterns/</link><pubDate>Tue, 29 Sep 2026 15:00:00 +0800</pubDate><guid>https://plumephp.com/clojure-error-handling-patterns/</guid><description>&lt;p&gt;函数式语言里「错误怎么表示」是个哲学题：抛异常是「控制流的一部分」，返回值是「数据的一部分」。Clojure 给了两条路——&lt;code&gt;ex-info&lt;/code&gt;/&lt;code&gt;ex-data&lt;/code&gt; 的结构化异常，与 Result/Either 风格的值化错误。没有唯一正确答案，只有「对场景合适」。本文把两种模型讲透：什么时候抛异常、什么时候返回值、错误如何携带语义、如何组合（safe/either）、如何统一兜底（中间件）、如何用 spec 拦截、如何恢复重试、如何记录。目标：你的代码「错误清晰、可诊断、可恢复」。&lt;/p&gt;</description></item></channel></rss>