Greets! I got stuck again with handling Exception.
This time however is a bit different.
My code is the following:
Code:
try {StrToInt(txtBox1hossz->Text);}
catch(...) {ShowMessage("You should have given an integer!"); goto subroutineend;}
But it does not what is should.
When I write a text into txtBox1hossz (not an integer), it gives me the error window of the EConvertError, not the message I wanted it to display!
After I make the program run further, it displays my error message.
But I only want it to display my message, when I write an improper value to the textbox, and jump to the subroutineend label.
How can I do this?
Thanks for help again!
Han