Re: [Dev] [DEV] [Jaggery]How to convert/cast an exception stachtrace to a string

2015-11-20 Thread Chamara Philips
Hi Ishara, In Jaggery you can use try, catch with Log to log errors properly. Following is an example. var log = new Log(); try{ //do work } catch (e) { log.error(e) ; //logs the stack trace print(e); // prints the stack trace } finally{ //do final } Also you can use the properties of ex

Re: [Dev] [DEV] [Jaggery]How to convert/cast an exception stachtrace to a string

2015-11-20 Thread Lalanke Athauda
Hi Ishara, Are you sure? It works perfect for me. I tested both with and without stringify method. Could you show your code? Maybe I might have misunderstood your problem. On Fri, Nov 20, 2015 at 1:21 PM, Ishara Cooray wrote: > Thanks for the reply Lalanke. But *stringify() * results the same. >

Re: [Dev] [DEV] [Jaggery]How to convert/cast an exception stachtrace to a string

2015-11-19 Thread Ishara Cooray
Thanks for the reply Lalanke. But *stringify() * results the same. Ishara Cooray Senior Software Engineer Mobile : +9477 262 9512 WSO2, Inc. | http://wso2.com/ Lean . Enterprise . Middleware On Fri, Nov 20, 2015 at 12:22 PM, Lalanke Athauda wrote: > Hi Ishara, > Try this one. > > var exceptionS

Re: [Dev] [DEV] [Jaggery]How to convert/cast an exception stachtrace to a string

2015-11-19 Thread Lalanke Athauda
Hi Ishara, Try this one. var exceptionString = "Custom Message" + *stringify*(e); Hope this solve your problem. On Fri, Nov 20, 2015 at 11:57 AM, Ishara Cooray wrote: > Hi, > > In Jaggerry If an exception is concatenated to a string it will > concatenate only the message part but the stacktrac

[Dev] [DEV] [Jaggery]How to convert/cast an exception stachtrace to a string

2015-11-19 Thread Ishara Cooray
Hi, In Jaggerry If an exception is concatenated to a string it will concatenate only the message part but the stacktrace is omited. ex: var exceptionString = "Custom Message" + e; This exceptionString does not have the stacktrace. How can i get the exception with the stacktrace as a string in Ja