This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Hi, If i have one function called open(). It will do some process, afterthat i want to return the error message from that function. How to return error message in java? Would you please explain by simple example? Thanks in advance, angela
Hi, Angela. I think you just want to declare that open() throws an exception, then catch it in your code.
Or am I missing something? Art
Joined: Nov 27, 2000
Thanks Art, But my question is different. Let me more specific. I have one class , in that I am displaying Error messages in Dialog Box. I have another class in that I have Open socket method. If there is something wrong in opening socket,I want to return some value which indicates that socket open failed, that value I want to display in Error message class with dialog box. Now Dialog Box will have two buttons: Retry and Cancel. If somebody click on Retry , it should open the socket again. Plz let me more specification, if you need, Thanks angela