improve error handling

This commit is contained in:
dloverin committed 2013-08-01 21:05:09 -04:00
1 parent b41ad227c1
commit 794c5d1ad8
7 files changed
+46 -24

No files matched your search

@@ -674,10 +674,13 @@ define(function (require, exports, module) {
properties = response.properties,
fnType = response.fnType,
type = response.type,
error = response.error,
$deferredHints = getPendingRequest(file, offset, type);
if ($deferredHints) {
if (completions) {
if (error) {
$deferredHints.reject();
} else if (completions) {
$deferredHints.resolveWith(null, [{completions: completions}]);
} else if (properties) {
$deferredHints.resolveWith(null, [{properties: properties}]);