Christophe Weblog Wiki Code Publications Music
stub for swank:operator-arglist
[swankr.git] / swank.R
diff --git a/swank.R b/swank.R
index ca1eff93665ed4b1625e4509a06178355d44a275..fa910b2abd5d3d918cbaa729ed291df2479e76da 100644 (file)
--- a/swank.R
+++ b/swank.R
@@ -64,11 +64,13 @@ makeSldbState <- function(condition, level, id) {
 }
 
 sldbLoop <- function(io, sldbState, id) {
-  sendToEmacs(io, c(list(quote(`:debug`), id, sldbState$level), debuggerInfoForEmacs(sldbState)))
-  sendToEmacs(io, list(quote(`:debug-activate`), id, sldbState$level, FALSE))
-  while(TRUE) {
-    dispatch(io, readPacket(io), sldbState)
-  }
+  tryCatch({
+    sendToEmacs(io, c(list(quote(`:debug`), id, sldbState$level), debuggerInfoForEmacs(sldbState)))
+    sendToEmacs(io, list(quote(`:debug-activate`), id, sldbState$level, FALSE))
+    while(TRUE) {
+      dispatch(io, readPacket(io), sldbState)
+    }
+  }, finally=sendToEmacs(io, c(list(quote(`:debug-return`), id, sldbState$level, FALSE))))
 }
 
 debuggerInfoForEmacs <- function(sldbState, from=0, to=NULL) {
@@ -260,6 +262,10 @@ printToString <- function(val) {
   "No Arglist Information"
 }
 
+`swank:operator-arglist` <- function(io, sldbState, op, package) {
+  list()
+}
+
 `swank:throw-to-toplevel` <- function(io, sldbState) {
   condition <- simpleCondition("Throw to toplevel")
   class(condition) <- c("swankTopLevel", class(condition))