title: Custom Exception Message in apex Salesforce
body: <p>I want to create a custom exception. In this exception I want to make a constructor which take one string arguments and append in <code>getMessage</code> .How to accomplish this.</p>
  
  <pre><code> public class TimelineException extends Exception{
    private String message;
      public override String getMessage(){
        return 'Not able to post to Timeline.getting response from Api : '+ message;
      }
    }
  </code></pre>
  
  <p>Main problem I am facing is when I use this:</p>
  
  <pre><code>public TimelineException(Sting x){
  }
  </code></pre>
  
  <p>then its give me error </p>
  
  <blockquote>
    <p>Save error: System exception constructor already defined: (String)   GMirror.cls /Google Salesforce Integration/src/classes.</p>
  </blockquote>