Changed error_code for exceptions in features.cpp