I am studying about System.NoErrMsg in C++ Builder XE4.
From the documents, I infer that by setting NoErrMsg true, I will not see the error MessageBox.
Following is my sample code.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
NoErrMsg = true; // System.NoErrMsg
StrToInt(" "); // make the error purposely
}
However, still the above code shows the Error MessageBox when I click Button1.
Is my understanding of NoErrMsg incorrect?
How is it normally used?
NoErrMsg
applies to runtime errors, such as I/O errors and OS errors. StrToInt()
raises an exception instead. Not the same thing, and NoErrMsg
does not apply to uncaught exceptions.