More helpful error message when a jasmine server is already running

This commit is contained in:
ragaskar
2009-10-31 10:50:18 -07:00
parent f9d73761bb
commit c21431415b
2 changed files with 28 additions and 3 deletions

View File

@@ -133,7 +133,12 @@ module Jasmine
JsAlert.new
])
Thin::Server.start('0.0.0.0', port, app)
begin
Thin::Server.start('0.0.0.0', port, app)
rescue RuntimeError => e
raise e unless e.message == 'no acceptor'
raise RuntimeError.new("A server is already running on port #{port}")
end
end
end