I am using Unidac components version 9.2..1 for RAD Studio 10.4 (Delphi 10.4 and C++Builder 10.4 Update2), Windows 10 Build 16299 64x.
I am forcing an Oracle Error ORA-00001 to make the application to catch it and display a message in Portuguese, I am getting the original message from the server instead.
Code: Select all
try
{
Query1->Execute();
UniConn1->Commit();
}
catch(EDAError *E)
{
if(E->ErrorCode == 00001 )
Application->MessageBox(L"Manobra já cadastrada!",
Application->Title.c_str(),
MB_ICONERROR+MB_OK);
else
Application->MessageBox(E->Message.c_str(),
Application->Title.c_str(),
MB_ICONERROR+MB_OK);
UniConn1->Rollback();
}
catch(Exception *E)
{
UniConn1->Rollback();
}
Kind regards.
Jayme Jeffman Filho