trace throw error instead of assert in C