search: Actually crash when seeing errors from a native search provider

We don't implement many of these, and not catching the error lets us
see stack traces and other such information a lot faster.

https://bugzilla.gnome.org/show_bug.cgi?id=704912
This commit is contained in:
Jasper St. Pierre 2013-07-25 23:08:27 -04:00
parent c0b45c9fc4
commit 8cc1fe007d

View File

@ -82,22 +82,14 @@ const SearchSystem = new Lang.Class({
if (isSubSearch) {
for (let i = 0; i < this._providers.length; i++) {
let [provider, previousResults] = previousResultsArr[i];
try {
results.push([provider, []]);
provider.getSubsearchResultSet(previousResults, terms);
} catch (error) {
log('A ' + error.name + ' has occured in ' + provider.id + ': ' + error.message);
}
results.push([provider, []]);
provider.getSubsearchResultSet(previousResults, terms);
}
} else {
for (let i = 0; i < this._providers.length; i++) {
let provider = this._providers[i];
try {
results.push([provider, []]);
provider.getInitialResultSet(terms);
} catch (error) {
log('A ' + error.name + ' has occured in ' + provider.id + ': ' + error.message);
}
results.push([provider, []]);
provider.getInitialResultSet(terms);
}
}
}