Skip to content

Commit

Permalink
Handle Turtle errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenVerborgh committed Nov 20, 2013
1 parent c3fad68 commit 1921610
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/LinkedDataFragmentsServer.js
Expand Up @@ -51,7 +51,8 @@ var prototype = LinkedDataFragmentsServer.prototype = {

// Shows results of a data source query
queryDatasource: function (req, res) {
var baseURL = this._baseURL,
var self = this,
baseURL = this._baseURL,
datasourceName = req.params[0] || 'index',
datasource = this._datasources[datasourceName],
query = req.query,
Expand All @@ -72,7 +73,8 @@ var prototype = LinkedDataFragmentsServer.prototype = {
var writer = new TurtleFragmentWriter(datasourceName, baseURL + '/' + datasourceName,
baseURL + req.url, pattern);
writer.write(res, queryResult);
});
})
.then(null, function (error) { self.handleError(error, req, res, null); });
},
});
},
Expand Down

0 comments on commit 1921610

Please sign in to comment.