Hi !
I've been making a stupid mistake while coding. After try/catch block i write code as if nothing has happened. For example i establish a network connection and retrieve some data from the server. Now after my try/catch block i'm using that data and go on as if nothing has happened. I don't think this is right. So i have come up with the following approach.
Suppose i have a boolean value and it is set to true in the try block. In the catch block it is set to false. So after my try/catch block I should test this boolan value. If it is true then there should be further processing and if it is false an error message should be displayed.
Do you think this is the right thing to do ?
Regards
Danish
[ July 05, 2003: Message edited by: Danish Shaukat ]
I've been making a stupid mistake while coding. After try/catch block i write code as if nothing has happened. For example i establish a network connection and retrieve some data from the server. Now after my try/catch block i'm using that data and go on as if nothing has happened. I don't think this is right. So i have come up with the following approach.
Suppose i have a boolean value and it is set to true in the try block. In the catch block it is set to false. So after my try/catch block I should test this boolan value. If it is true then there should be further processing and if it is false an error message should be displayed.
Do you think this is the right thing to do ?
Regards
Danish
[ July 05, 2003: Message edited by: Danish Shaukat ]