Fix major issue in generic_error class
Fix improper macro definition