<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>keichanzahorumon0405</author_name>
  <author_url>https://blog.hatena.ne.jp/keichanzahorumon0405/</author_url>
  <blog_title>技術開発日記</blog_title>
  <blog_url>https://kechanzahorumon.hatenadiary.com/</blog_url>
  <categories>
    <anon>Java</anon>
  </categories>
  <description>メソッドの引数が不正だった場合に IllegalArgumentException をthrowするのはよく使っていたりしていたけど、、、 以下のような感じで。 public void regist(String name) { // 引数チェック if (name == null) { throw new IllegalArgumentException(&quot;引数が不正です。&quot;); } } ただ、それとは別に IllegalStateException というものがあって、これがオブジェクト状態が不正のときに使うものだとは知らなかった。例えばあるオブジェクトのフィールドがnullを保持して欲し…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkechanzahorumon.hatenadiary.com%2Fentry%2F2012%2F09%2F21%2F180147&quot; title=&quot;IllegalArgumentExceptionとIllegalStateExceptionの違い - 技術開発日記&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>2012-09-21 18:01:47</published>
  <title>IllegalArgumentExceptionとIllegalStateExceptionの違い</title>
  <type>rich</type>
  <url>https://kechanzahorumon.hatenadiary.com/entry/2012/09/21/180147</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
