Hi,
+1 for throwing the message.
But another question,
At the moment we have put all details possible for the message. eg: tenant
domain, username ,application type etc.
But when it comes to user (front end) i think message should be simple.

For an example.
Lets say an error occurred while creating an application.

should the message diplayed on the UI be like ,
var msg = " Application creation failed!!"
or
var msg = "Error while creating application : " + applicationName + " with
application key : " + applicationKey
                  + " of application type : " + applicationType + " and
version : " + version + " for the user : "
                  + userName + " of tenant domain : " + tenantDomain + ".

On Mon, Mar 16, 2015 at 2:44 PM, Danushka Fernando <[email protected]>
wrote:

> Since this is about sending an error message for front end IMO both ways
> are ok for me. And since we are showing the error message we are throwing I
> guess we need to throw the message.
>
> Thanks & Regards
> Danushka Fernando
> Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729
>
> On Mon, Mar 16, 2015 at 2:40 PM, Mahesh Chinthaka <[email protected]>
> wrote:
>
>> Hi all,
>>
>> In AF appmgt module layer,
>> when we catch a exception what is the correct way to handle it.
>>
>> var msg = "Some error msg";
>> log.error(msg);
>> log.error(e);
>> *throw e; *
>> or
>> *throw msg;*
>>
>> In appfactory we get the error message thrown in the module layer to
>> front and display it in UI in the top section of the page with a red bar.
>> So if we thew e, the GUI will get a big error message displayed with all
>> the stack trace details.
>>
>>
>> Whats the best way ??
>>
>> --
>> *Mahesh Chinthaka Vidanagama* | Software Engineer
>> WSO2, Inc | lean. enterprise. middleware.
>> #20, Palm Grove, Colombo 03, Sri Lanka
>> Mobile: +94 71 63 63 083 | Work: +94 112 145 345
>> Email: [email protected] | Web: www.wso2.com
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>


-- 
*Mahesh Chinthaka Vidanagama* | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345
Email: [email protected] | Web: www.wso2.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to