Hi Harsha, Your answer resolved my confusion. Thanks a lot. :)
On Wed, Mar 11, 2015 at 4:31 PM, Harsha Thirimanna <[email protected]> wrote: > Hi Mahesh, > > Using above try block, we are not expecting to handle exception. We don't > want to handle run-time exception or there may be some exception that we > are not already identified. So those exception will be thrown by some code > segment within this block. But think like you have allocated some resource > within this and you need to release it anyhow even though there are some > exception thrown. So you can do it like above block. In this case you are > not aware of the exception handling. Just use for closing/releasing > resource. > > thanks > > > *Harsha Thirimanna* > Senior Software Engineer; WSO2, Inc.; http://wso2.com > * <http://www.apache.org/>* > *email: **[email protected]* <[email protected]>* cell: +94 71 5186770 , > +94 * > *774617784twitter: **http://twitter.com/ > <http://twitter.com/afkham_azeez>* > *harshathirimannlinked-in: **http: > <http://lk.linkedin.com/in/afkhamazeez>**//www.linkedin.com/pub/harsha-thirimanna/10/ab8/122 > <http://www.linkedin.com/pub/harsha-thirimanna/10/ab8/122>* > > *Lean . Enterprise . Middleware* > > > On Wed, Mar 11, 2015 at 3:39 AM, Mahesh Chinthaka <[email protected]> > wrote: > >> Hi Chanuka, >> Thanks for the reply. >> But what I wanted to know is if catch clause is not available how the >> exceptions are handled inside that code. >> >> On Wed, Mar 11, 2015 at 3:39 PM, Chanuka Dissanayake <[email protected]> >> wrote: >> >>> Hi Mahesh, >>> >>> Jaggery is JavaScript, hence *try, catch *and* finally* blocks can be >>> used within your code as you usual. Also, passed JavaScript *Error* object >>> can be used to get a brief information about the error [1]. Also you can >>> find a sample in [2]. Hope this will help you. >>> >>> [1] >>> http://ruchirawageesha.blogspot.com/2013/04/error-handling-in-jaggery.html >>> [2] http://jaggeryjs.org/documentation.jag?api=ws >>> >>> Regards, >>> Chanuka. >>> >>> On Wed, Mar 11, 2015 at 12:44 PM, Mahesh Chinthaka <[email protected]> >>> wrote: >>> >>>> >>>> Hi all , >>>> I have been working on [1] and I found some codes written with try and >>>> finally blocks without a catch block in the module layer of a jaggery app. >>>> >>>> try { >>>> >>>> } finally { >>>> >>>> } >>>> >>>> Is this ok ? >>>> If so how the errors are caught and thrown, when it comes to exception >>>> handling ? >>>> >>>> [1] - https://wso2.org/jira/browse/APPFAC-2725 >>>> >>>> Thoughts are much appreciated. >>>> Thanks. >>>> >>>> -- >>>> *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 >>>> >>>> >>> >>> >>> -- >>> Chanuka Dissanayake >>> *Software Engineer | **WSO2 Inc.*; http://wso2.com >>> >>> Mobile: +94 71 33 63 596 >>> Email: [email protected] >>> >> >> >> >> -- >> *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
