From 86151bb5efbce2a13bd278184d3460cf8593b31d Mon Sep 17 00:00:00 2001 From: Scott Feeney Date: Fri, 5 Jul 2013 17:07:46 -0400 Subject: [PATCH] Blueslip: on staging, save stacktrace for easy c&p (imported from commit 5c6b3ddd789100b011aeef863495ae8cb5cdaac8) --- zephyr/static/js/blueslip.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zephyr/static/js/blueslip.js b/zephyr/static/js/blueslip.js index 18095ccf30..ae5f00e875 100644 --- a/zephyr/static/js/blueslip.js +++ b/zephyr/static/js/blueslip.js @@ -92,6 +92,14 @@ function report_error(msg, stack, opts) { } } }); + + if (page_params.staging) { + // Save the stacktrace so it can be examined even on local servers. + // (N.B. This assumes you have set DEBUG = False on your local + // server, or else this code path won't execute to begin with -- + // useful for testing (un)minification.) + window.last_stacktrace = stack; + } } function BlueslipError(msg, more_info) {