Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(692)

Unified Diff: pkg/shelf/lib/src/handlers/logger.dart

Issue 260933004: Support Request hijacking in Shelf, using a similar API to Rack. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/shelf/lib/src/handlers/logger.dart
diff --git a/pkg/shelf/lib/src/handlers/logger.dart b/pkg/shelf/lib/src/handlers/logger.dart
index 2e95cf99268fec4f505e8414de26282f110a96c7..e949c9bc29c22a461feb834f778e9c61f8f3f71e 100644
--- a/pkg/shelf/lib/src/handlers/logger.dart
+++ b/pkg/shelf/lib/src/handlers/logger.dart
@@ -6,6 +6,7 @@ library shelf.handlers.logger;
import 'package:stack_trace/stack_trace.dart';
+import '../hijack_exception.dart';
import '../middleware.dart';
import '../util.dart';
@@ -37,6 +38,8 @@ Middleware logRequests({void logger(String msg, bool isError)}) =>
return response;
}, onError: (error, stackTrace) {
+ if (error is HijackException) throw error;
kevmoo 2014/05/07 19:28:22 Is this something we want to generalize? A base cl
nweiz 2014/05/19 20:10:29 As per our in-person discussion, I think we're unl
+
var msg = _getErrorMessage(startTime, request.url, request.method,
watch.elapsed, error, stackTrace);

Powered by Google App Engine
This is Rietveld 408576698