google-code-export / jwebsocket

Automatically exported from code.google.com/p/jwebsocket
1 stars 3 forks source link

Syntax errors error in config file should be reported properly #95

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
If we have a syntax error in the jWebSocket.xml (e.g. closing tag missing or 
similar) the server raises more or less uncomprehensible exceptions. Please 
provide a way to catch that and log a comprehensible message w/o the stack 
trace.

Original issue reported on code.google.com by fivefeetfurther@gmail.com on 15 Oct 2010 at 4:13

GoogleCodeExporter commented 9 years ago
Exceptions look like this:

Exception in thread "main" org.jwebsocket.kit.WebSocketRuntimeException: Error 
parsing jWebSocket.xml configuration file
        at org.jwebsocket.config.xml.JWebSocketConfigHandler.processConfig(JWebSocketConfigHandler.java:142)
        at org.jwebsocket.factory.JWebSocketLoader.loadConfiguration(JWebSocketLoader.java:85)
        at org.jwebsocket.factory.JWebSocketLoader.initialize(JWebSocketLoader.java:60)
        at org.jwebsocket.factory.JWebSocketFactory.start(JWebSocketFactory.java:44)
        at org.jwebsocket.console.JWebSocketServer.main(JWebSocketServer.java:54)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[427,5]
Message: The content of elements must consist of well-formed character data or 
markup.
        at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:593)
        at org.jwebsocket.config.xml.FilterConfigHandler.processConfig(FilterConfigHandler.java:56)
        at org.jwebsocket.config.xml.JWebSocketConfigHandler.handleFilters(JWebSocketConfigHandler.java:293)
        at org.jwebsocket.config.xml.JWebSocketConfigHandler.processConfig(JWebSocketConfigHandler.java:116)
        ... 4 more

Original comment by fivefeetfurther@gmail.com on 15 Oct 2010 at 4:16