Catch EDAError

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jjeffman
Posts: 84
Joined: Tue 09 Nov 2004 12:22
Location: Porto Alegre-Rio Grande do Sul - Brazil

Catch EDAError

Post by jjeffman » Sat 03 Sep 2022 17:04

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

jjeffman
Posts: 84
Joined: Tue 09 Nov 2004 12:22
Location: Porto Alegre-Rio Grande do Sul - Brazil

Re: Catch EDAError

Post by jjeffman » Mon 12 Sep 2022 21:41

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

Post Reply