123: def collision_handler()
124: msg = [
125: " *** Breakpoint service collision ***",
126: " Another Breakpoint service tried to use the",
127: " port already occupied by this one. It will",
128: " keep waiting until this Breakpoint service",
129: " is shut down.",
130: " ",
131: " If you are using the Breakpoint library for",
132: " debugging a Rails or other CGI application",
133: " this likely means that this Breakpoint",
134: " session belongs to an earlier, outdated",
135: " request and should be shut down via 'exit'."
136: ].join("\n")
137:
138: if RUBY_PLATFORM["win"] then
139:
140:
141:
142:
143:
144:
145: begin
146: require 'tk'
147: root = TkRoot.new { withdraw }
148: Tk.messageBox('message' => msg, 'type' => 'ok')
149: root.destroy
150: rescue Exception
151: puts "", msg, ""
152: end
153: else
154: puts "", msg, ""
155: end
156: end