Promises/A+ with error handling and context support