title: ValidationError or TypeError, ValueError - Exceptions
body: <p>I am quite a newbie understanding of how to catch exceptions in python. I have a question regarding those two types of ways of catching exceptions. I only found useful information about ValidationError regarding <a href="https://stackoverflow.com/questions/18781492/forms-validationerror-and-error-code">here</a>  </p>
  
  <p>But I did not quite understand if it can be used besides django or what are the error messages that I can expect about it. I saw this code sample regarding the validation of types. </p>
  
  <pre><code>except (TypeError, ValueError) as error:
              LOGGER.error('Error e.g.', exc_info=True)
  
  except ValidationError:
              LOGGER.error('Error e.g', exc_info=True)
  </code></pre>
  
  <p>So for <code>TypeError</code> and <code>ValueError</code> for me, it is clear:</p>
  
  <p><strong>exception ValueError</strong></p>
  
  <p>Raised when an operation or function receives an argument that has the right type but an inappropriate value, and the situation is not described by a more precise exception such as IndexError.</p>
  
  <p><strong>exception TypeError</strong></p>
  
  <p>Raised when an operation or function is applied to an object of inappropriate type. The associated value is a string giving details about the type mismatch.</p>
  
  <p><strong>In conclusion,</strong>
  I am trying to understanding what would be the advantage of the second code with <code>ValidationError</code>, but it could be tricky as I did not find good documentation about. If someone could share knowledge about ValidationError, I would highly appreciate,</p>
  
  <p>I am raising this question because I am going to use related library and I have not seen the exceptions being treated like this.</p>
  
  <p><a href="https://pypi.org/project/related/" rel="nofollow noreferrer">https://pypi.org/project/related/</a></p>
  
  <p><strong>Thank you community!</strong></p>