<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>quoll00</author_name>
  <author_url>https://blog.hatena.ne.jp/quoll00/</author_url>
  <blog_title>Carpe Diem</blog_title>
  <blog_url>https://christina04.hatenablog.com/</blog_url>
  <categories>
    <anon>Go</anon>
  </categories>
  <description>背景 エラーハンドリングでは エラーが発生した箇所を追うことができる スタックトレースが出力できればなお良し エラーの原因によって処理を分岐することができる といったことが重要です。 Go 1.13から入ったラップする仕組みにより、エラーメッセージにアノテートしていくことができエラーの発生箇所を追いやすくなりました。 またerrors.Isによりエラー原因による条件分岐もしやすくなりました。 今回はそれらと独自エラーの扱いについて説明します。 環境 Go 1.16.7</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchristina04.hatenablog.com%2Fentry%2Ffmt-vs-xerrors-vs-original-error&quot; title=&quot;fmt.Errorfとxerrors.Errorfと独自エラーと - Carpe Diem&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-08-18 19:36:19</published>
  <title>fmt.Errorfとxerrors.Errorfと独自エラーと</title>
  <type>rich</type>
  <url>https://christina04.hatenablog.com/entry/fmt-vs-xerrors-vs-original-error</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
