Christophe Weblog Wiki Code Publications Music
implement swank:throw-to-toplevel
[swankr.git] / 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)
+}