D - throw - catch
- Matthew Wilson (34/34) Oct 10 2003 Any reason why we can't borrow some nice parts from a couple of other
- J Anderson (3/38) Oct 14 2003 I like it.
Any reason why we can't borrow some nice parts from a couple of other languages, and allow the following Enumerator Enumerate() { hrecls_t hSrch; recls_rc_t rc = Search_Create(m_searchRoot, m_pattern, m_flags, hSrch); try { return new Enumerator(hSrch, rc); } catch { Search_Close(hSrch); throw; } } which would translate to Enumerator Enumerate() { hrecls_t hSrch; recls_rc_t rc = Search_Create(m_searchRoot, m_pattern, m_flags, hSrch); try { return new Enumerator(hSrch, rc); } catch(Exception x) { Search_Close(hSrch); throw x; } } It's a nice sugar.
Oct 10 2003
Matthew Wilson wrote:Any reason why we can't borrow some nice parts from a couple of other languages, and allow the following Enumerator Enumerate() { hrecls_t hSrch; recls_rc_t rc = Search_Create(m_searchRoot, m_pattern, m_flags, hSrch); try { return new Enumerator(hSrch, rc); } catch { Search_Close(hSrch); throw; } } which would translate to Enumerator Enumerate() { hrecls_t hSrch; recls_rc_t rc = Search_Create(m_searchRoot, m_pattern, m_flags, hSrch); try { return new Enumerator(hSrch, rc); } catch(Exception x) { Search_Close(hSrch); throw x; } } It's a nice sugar.I like it. -Anderson
Oct 14 2003