Monthly Archives: February 2014

C++ 11 – Exception safe guidline from Jon Kalb

Throw by value. Catch by reference No dynamic exception specifications. Use noexcept. Destructors that throw are evil. Use RAII. (Every responsibility is an object. One per.) All cleanup code called from a destructor Support swapperator (With No-Throw Guarantee) Draw “Critical … Continue reading

Posted in C++, Programming | Tagged | Leave a comment

The most important design guideline

Scott Myer’s word for design software. All interface should be easy to use correctly and hard to use incorrectly.

Posted in C++, Programming | Leave a comment

C++11 – std::rethrow_if_nested

std::throw_with_nested will create a class inherited from std::std::nested_exception and user exception then it will get current exception and user exception in it then throw. Ex) std::throw_with_nested(MyException());

Posted in C++, Programming | Leave a comment

C# – print a file name and line number when an exception was thrown

Posted in .NET, Programming | Leave a comment

C# – Rx framework to create Observable from EventHandler

The following code shows how to create IObserable object from EventHandler delegator.

Posted in .NET, Programming | Leave a comment