DMD 0.148 - scope guard

Miles _______ at _______.____
Sun Feb 26 23:10:41 PST 2006


Walter Bright wrote:
> finally does work for on_scope_exit, but it leaves on_scope_success and 
> on_scope_failure hanging. 

on_scope_exit    -> finally { ... }
on_scope_success -> finally(true) { ... }
on_scope_failure -> finally(false) { ... }

on_scope_exit    -> finally { ... }
on_scope_success -> finally(success) { ... }
on_scope_failure -> finally(failure) { ... }

on_scope_exit    -> finally { ... }
on_scope_success -> finally("success") { ... }
on_scope_failure -> finally("failure") { ... }

on_scope_exit    -> finally { ... }
on_scope_success -> finally return { ... }
on_scope_failure -> finally throw { ... }



More information about the Digitalmars-d mailing list