• Post Reply Bookmark Topic Watch Topic
  • New Topic

throwing an exception in thread.run()

 
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!