title: Why String.indexOf do not use exception but return -1 when substring not found?
body: <p>Why String.indexOf do not use exception but return -1 when substring not found?</p>
  
  <p>The purpose of this question is: when we start custom exception.</p>
  
  <p>I believe avoid the need to return special error code is right design path.</p>
  
  <p>What's your opinion?</p>