title: Not throwing business exceptions, but returning value
body: <p>I have the following method:</p>
  
  <pre><code>public void Foo addFoo(String name);
  </code></pre>
  
  <p>This methods adds <code>Foo</code> to some structure. In the same time, it checks if <code>Foo</code> by given <code>name</code> already exist. I can throw some <code>FooNameConflictException</code>, but I would not, since I don't consider this as exception - this is something that can happens, and it is part of the business flow of the application.</p>
  
  <p>Instead, I would return the information if <code>Foo</code> by given name already exist. What is the pragmatical way to do this? What should I return in case when name already exist?</p>
  
  <ol>
  <li><p>Return <code>null</code> - and this is pure ugly as <code>null</code> does not means anything and it is not extensible and... ugly.</p></li>
  <li><p>Return <code>Foo</code> with some internal status that indicates that <code>Foo</code> is NEW or EXISTING. However, we must carefully design state change from NEW -> EXISTING, i.e. I am not sure when this would happened, and may fail in multi-threaded environments.</p></li>
  <li><p>Make new class <code>FooOperation</code> or <code>FooAdding</code> that compose of <code>Foo</code> instance and additional flag(s) that brings more information about the addition process.</p></li>
  <li><p>I may go with generic variant of #3 and have class like <code>Either</code>, but then you are bound to two values (left or right).</p></li>
  </ol>
  
  <p>I see solution #3 as the only pragmatical in this case. Am I missing something?</p>