Modify

Opened 12 years ago

Closed 10 years ago

#4062 closed defect (fixed)

Remotecontrol throws verbose exception info to console whet it can't bind to the default port

Reported by: avarab@… Owned by: framm
Priority: trivial Milestone:
Component: Core remotecontrol Version: latest
Keywords: Cc:

Description

Remotecontrol will throw an exception like this to the console:

loading remotecontrol
java.net.BindException: Address already in use
	at java.net.PlainSocketImpl.socketBind(Native Method)
	at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
	at java.net.ServerSocket.bind(ServerSocket.java:319)
	at java.net.ServerSocket.<init>(ServerSocket.java:185)
	at org.openstreetmap.josm.plugins.remotecontrol.HttpServer.<init>(HttpServer.java:37)
	at org.openstreetmap.josm.plugins.remotecontrol.RemoteControlPlugin.restartServer(RemoteControlPlugin.java:42)
	at org.openstreetmap.josm.plugins.remotecontrol.RemoteControlPlugin.<init>(RemoteControlPlugin.java:21)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	at org.openstreetmap.josm.plugins.PluginInformation.load(PluginInformation.java:185)
	at org.openstreetmap.josm.plugins.PluginHandler.loadPlugins(PluginHandler.java:207)
	at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:150)

A simple 1-line message saying it couldn't bind to the port would suffice, but I couldn't find a way to do that by catching the exception and throwing something that didn't print out the full backtrace but stil didn't make the run() method run.

Attachments (0)

Change History (1)

comment:1 Changed 10 years ago by simon04

Resolution: fixed
Status: newclosed

In [4797/josm]:

fix #4062 - remotecontrol prints stack trace when it can't bind to the default port

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain framm.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.