And also IMO it should be reponse.*message* = msg; instead of reponse.*content* = msg;
On Mon, Mar 30, 2015 at 6:03 PM, Mahesh Chinthaka <[email protected]> wrote: > Hi all, > > Im working on [1] > > What is the best way to handle exceptions in jaggery block layer. > Specially when its a block layer-ajax > > Is following way correct ? > > catch (e) { > var msg = "Error while getting database info for the application : " + > applicationKey > ; > log.error(msg); > log.error(e) > response.status = 500 > reponse.content = msg; > } > > Dont we need to throw the error here ?? > > > [1] - https://wso2.org/jira/browse/APPFAC-2724 > -- > *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 > -- *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
