Skip to content

Commit fdfcb54

Browse files
committed
Log controller extension errors.
Before this commit, they would occur silently.
1 parent 00a5deb commit fdfcb54

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/controllers/TriplePatternFragmentsController.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ TriplePatternFragmentsController.prototype._handleRequest = function (request, r
4141

4242
// Execute the extensions and render the query result
4343
var extensions = this._extensions, extensionId = 0;
44-
(function nextExtension() {
44+
(function nextExtension(error) {
45+
// Log a possible error with the previous extension
46+
if (error)
47+
process.stderr.write(error.stack + '\n');
4548
// Execute the next extension
4649
if (extensionId < extensions.length)
4750
extensions[extensionId++].handleRequest(request, response, nextExtension, settings);

0 commit comments

Comments
 (0)