<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kagamihoge</author_name>
  <author_url>https://blog.hatena.ne.jp/kagamihoge/</author_url>
  <blog_title>kagamihogeの日記</blog_title>
  <blog_url>https://kagamihoge.hatenablog.com/</blog_url>
  <categories>
    <anon>C</anon>
  </categories>
  <description>Cは例外処理機構がない。例外がない言語を使ってはじめてわかるありがたさ。Cの場合、エラーの扱い方は基本的に関数の戻り値でやります。エラーコードとかNULLとか不正値返したりとか。出力パラメータで同じことやる、ってのもあるかな。なので、エラー処理の基本は下のような返り値if文チェックでやることになる。 int ret = do_hoge(...); if (ret == ERR_CODE) { perror(&quot;エラーです&quot;); return 2; } これの何が煩わしいって、いわゆる「例外」とフツーの「エラーケース」がごちゃまぜになる点。これでもまぁ不都合はないんだけど、例外とエラー処理は分けて…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkagamihoge.hatenablog.com%2Fentry%2F20060614%2F1150278214&quot; title=&quot;C言語の例外とエラー処理 - kagamihogeの日記&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>2006-06-14 18:43:34</published>
  <title>C言語の例外とエラー処理</title>
  <type>rich</type>
  <url>https://kagamihoge.hatenablog.com/entry/20060614/1150278214</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
