This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes throwing an exception in thread.run() Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "throwing an exception in thread.run()" Watch "throwing an exception in thread.run()" New topic
Author

throwing an exception in thread.run()

king_preetham
Greenhorn

Joined: Nov 04, 2001
Posts: 3
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

Joined: Jan 17, 2001
Posts: 71
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.


Nitin S<br />Sun Certified Java Programmer for the Java 2 platform.<br />Tekmetrics Certified Java Programmer For the Java 2 Platform.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: throwing an exception in thread.run()
 
Similar Threads
returning a resultset in rmi
help
Thread question - uCertify 6.0
NX:Create/Delete invalid data
Problem zipping the file