Delegates from close to 200 countries huddled for a week of marathon negotiations but came up short on delivering a treaty.