<div dir="ltr"><div>Thanks Thomas,<br><br></div><div>I was looking to have all error messages to be printed in a known format.<br></div><div><br></div><div>I was thinking of printing the string returned by the Error() method of the specific error type.<br></div><div>Example,<br><br></div><div>nie := models.NewInternalError("Database cannot be reached")<br></div><div>// print nie.Error()<br><br></div><div>instead of having print statements in the code like:<br><br></div><div>fmt.Println("Error connecting to database")<br><br><br></div><div>/Shoubhik<br></div><div><br><br><br></div><div><br><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 10, 2016 at 4:10 PM, Thomas Mäder <span dir="ltr"><<a href="mailto:tmader@redhat.com" target="_blank">tmader@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>Hi Shoubhik,</p>
    <p>are you worried about having the same format for error messages
      or do you want to classify the errors into small set of different
      ones?</p>
    <p>/Thomas<br>
    </p><div><div class="h5">
    <br>
    <div class="m_-976241399431323293moz-cite-prefix">On 11/10/2016 11:31 AM, Shoubhik Bose
      wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">
        <div>
          <div>
            <div>Hi folks,<br>
            </div>
            <br>
            I was wondering if we could agree on having error messages
            printed *only* by calling the custom defined error types in
            models/errors.go like NotFoundError(..) ,
            BadParameterError(..)<br>
            <br>
          </div>
          That way we could use the error output accurately with log
          analysis tools, or even better come up with error codes in
          future ( like Oracle has ORA-XXX )<br>
          <br>
        </div>
        /Shoubhik<br>
        <div>
          <div>
            <div>
              <div><br>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="m_-976241399431323293mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
almighty-public mailing list
<a class="m_-976241399431323293moz-txt-link-abbreviated" href="mailto:almighty-public@redhat.com" target="_blank">almighty-public@redhat.com</a>
<a class="m_-976241399431323293moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/almighty-public" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/almighty-<wbr>public</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br></div>