This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

throwing an exception in thread.run()  RSS feed

 
king_preetham
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all..
I have a server Pgm which spawns a thread as a client connection comes up.
The server thread and client module interacts only thru SOCKETS..
Is there any possibility of throwing an exception from thread.run()which is at the server end to the client pgm ???
Thanks
Preetham.
 
Nitin Shivaram
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You could get the output stream to the client socket and in the catch clause insert a "outputStreamOfClientSocket.write(exception.printStackTrace());
Simple eh?
------------------
Nitin S
Sun Certified and Tekmetrics Certified Java Programmer For the Java 2 Platform.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!