Re: Try/Catch

new topic     » goto parent     » topic index » view thread      » older message » newer message
jimcbrown said...
Spock said...

With try/catch I would

No, you wouldn't. If you don't understand my explanation then reread ghaberek's post.

Spock said...

as you just told me I'd have to do wrapping with delete_routine() which I don't believe will be such a trivial task.

You don't need to use delete_routine() ... it's optional. You can clean up with try..catch..finally without having to use delete_routine().

Conversely, you can use delete_routine() with try..catch, SSC, and even the existing regime today (crash_routine()). These are two separate things.

Ok. I think I got this right:

1 Add delete_routine() to libraries - cleanup happens automatically when atom leaves scope
Or
2 Use try/catch/finally - manually call cleanup routine

Let's say I'm too lazy to do 1 (or it'd be really awkward since my libraries usually return integers (object IDs) not pointers). So how will I know which cleanup routines to call in finally in 2?

Spock

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu