313
edits
(note about 'return rv' pattern) |
|||
Line 68: | Line 68: | ||
nsresult rv = callSomeMethod(); | nsresult rv = callSomeMethod(); | ||
// | // note1: no code between call & rv test -- such code can of course be | ||
// | // accommodated with exceptions but requires more design | ||
// note2: also accept NS_SUCCEEDED(rv) with code in opposite then/else branches | |||
if (NS_FAILED(rv)) { | if (NS_FAILED(rv)) { | ||
maybe fixup(); | maybe fixup(); |
edits