Use C++11 error handling instead of boost