title: Exception class
body: <p>So i'm doing a class Exception for linked list, but i have no idea what to put it in. For example, if the user wants to delete an element that does not exist in the list, it will print out "Sparse Exception caught: Element not found, delete fail", or "Sparse Exception caught: sparse matrix empty, printing failed". Is it ok for me to do it this way? If so, how do i print out the message?</p>
  
  <pre><code>SparseException::SparseException ()
  {
  }
  SparseException::SparseException (char *message)
  {
  if (strcmp(message, "delete"))
        cout &lt;&lt; "Sparse Exception caught: Element not found, delete fail";
     else
        cout &lt;&lt; "Sparse Exception caught: sparse matrix empty, printing failed";
  }
  
  void SparseException::printMessage () const
  {
  
  }
  </code></pre>