Unified assert behaviour while error handling