From 0a804a3b5bef5dffd111b7ccd49195274e7ec820 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Thu, 25 Jun 2009 15:54:03 +0200 Subject: [PATCH] The toplevel should only trap the SERIOUS-CONDITIONs --- src/CHANGELOG | 4 ++++ src/lsp/top.lsp | 15 +++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/CHANGELOG b/src/CHANGELOG index 52544ee5d..28e5f2ae3 100644 --- a/src/CHANGELOG +++ b/src/CHANGELOG @@ -24,6 +24,10 @@ ECL 9.6.3: - The compiler no longer enters the debugger when it finds an error in the code it compiles. +* Visible changes: + + - The toplevel only traps SERIOUS-CONDITIONS. + ECL 9.6.2: ========== diff --git a/src/lsp/top.lsp b/src/lsp/top.lsp index 680944f53..2d1a79fff 100644 --- a/src/lsp/top.lsp +++ b/src/lsp/top.lsp @@ -436,13 +436,16 @@ under certain conditions; see file 'Copyright' for details.") (unless quiet (break-where)) (flet ((rep () - (handler-bind - ((condition + ;; We let warnings pass by this way "warn" does the + ;; work. It is conventional not to trap anything + ;; that is not a SERIOUS-CONDITION. Otherwise we + ;; would be interferring the behavior of code that relies + ;; on conditions for communication (for instance our compiler) + ;; and which expect nothing to happen by default. + (handler-bind + ((serious-condition (lambda (condition) - (cond ((subtypep (type-of condition) 'warning) - ;; We let warnings pass by this way "warn" does the work. - ) - ((< break-level 1) + (cond ((< break-level 1) ;; Toplevel should enter the debugger on any condition. ) (*allow-recursive-debug*