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 > >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
