fixed exception handling for g_test