Christophe Weblog Wiki Code Publications Music
implement swank:throw-to-toplevel
authorChristophe Rhodes <csr21@cantab.net>
Wed, 11 Aug 2010 14:58:47 +0000 (15:58 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Wed, 11 Aug 2010 14:58:47 +0000 (15:58 +0100)
swank.R

diff --git a/swank.R b/swank.R
index e51abab78fa2490a7599a3327d3889d793fe9d34..11d11359fd4ce557b7bd28a2293150ad57c8e196 100644 (file)
--- a/swank.R
+++ b/swank.R
@@ -203,3 +203,9 @@ writeSexpToString <- function(obj) {
 `swank:autodoc` <- function(rawForm, ...) {
   "No Arglist Information"
 }
+
+`swank:throw-to-toplevel` <- function() {
+  condition <- simpleError("Throw to toplevel")
+  class(condition) <- c("swankTopLevel", class(condition))
+  signalCondition(condition)
+}