
24 Mar
2011
24 Mar
'11
11:58 p.m.
From: Brian Wood In the last 2 or 3 months I added a try/catch and throw without arguments to a file in my library -- http://webEbenezer.net/misc/ReceiveCompressedBuffer.hh .
You can eliminate the try/catch from the code. For example, instead of: try { // do sth dangerous using cmpRead } catch(...) { cmpRead = 0; throw; } write: auto tmp = cmpRead; cmpRead = 0; // do sth dangerous using tmp cmpRead = tmp; Best regards, Robert