Page 1 of 1

Catch EDAError

Posted: Sat 03 Sep 2022 17:04
by jjeffman
Hello,

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();
		}
What am I doing wrong?

Kind regards.

Jayme Jeffman Filho

Re: Catch EDAError

Posted: Mon 12 Sep 2022 21:41
by jjeffman
It is unbelievable, seventy visualizations and no any answer of what I guess is a bug of the component, TUniQuery->Execute() method is not throwing any exception and delegating this task to TUniConnection. I was hopping that somebody from the Devart team will answer to this question.
Devart support was better some years ago.

Kind regards.

Jayme Jeffman Filho