added throw error support in promise