[almighty] Error messages in ALM

Shoubhik Bose shbose at redhat.com
Thu Nov 10 10:45:12 UTC 2016


Thanks Thomas,

I was looking to have all error messages to be printed in a known format.

I was thinking of printing the string returned by the Error() method of the
specific error type.
Example,

nie := models.NewInternalError("Database cannot be reached")
// print nie.Error()

instead of having print statements in the code like:

fmt.Println("Error connecting to database")


/Shoubhik







On Thu, Nov 10, 2016 at 4:10 PM, Thomas Mäder <tmader at redhat.com> wrote:

> Hi Shoubhik,
>
> 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?
>
> /Thomas
>
> On 11/10/2016 11:31 AM, Shoubhik Bose wrote:
>
> Hi folks,
>
> 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(..)
>
> 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
> )
>
> /Shoubhik
>
>
>
> _______________________________________________
> almighty-public mailing listalmighty-public at redhat.comhttps://www.redhat.com/mailman/listinfo/almighty-public
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/almighty-public/attachments/20161110/19240639/attachment.htm>


More information about the almighty-public mailing list