Cut off __FILE__:__LINE__ from stack trace.
authorueno <ueno>
Fri, 12 Aug 2005 05:12:48 +0000 (05:12 +0000)
committerueno <ueno>
Fri, 12 Aug 2005 05:12:48 +0000 (05:12 +0000)
lisp/server.rb

index 05220b8..107a1f0 100644 (file)
@@ -103,7 +103,8 @@ class Server
       Thread.current[:rubyserv_response] = eval(r, exec_env.empty_binding)
     rescue Exception => e
       Thread.current[:rubyserv_error] = true
-      Thread.current[:rubyserv_response] = e.to_s.sub(/\A.*?\n/, '')
+      Thread.current[:rubyserv_response] =
+        e.to_s.sub(/\A.*?\n#{Regexp.quote(__FILE__)}:\d+: /o, '')
     end
     send_line("# exit #{name}\r\n")
   end