Problem in EIBInterbaseError

Hi everybody!

I am using Delphi 6 and I am programming about DB.
I have a problem:
When I run my program If I inputed a record that Primary key of record was
existed. (duplicate PK),
I have saw a error message:

"Access violation of PRIMARY or UNIQUE KEY Contraint "PK_EMP_NO" on table
"EMPLOYEES".

Now, I want to replace this error message by a message that I have defined,
for example:

"Employee No was exist !"

But I don't know how to do
Can you help me!
Thanks

maimO