PDA

View Full Version : Exception Code or Error Code


Daniel
07-Jul-2005, 03:20 PM
Can I have Exception code o error Code? If I can, How can I have it? Any Sample code source???

Thanks :confused:

admin
10-Jul-2005, 11:18 AM
If your exception type include a property for stored the exception/error code then you can simply make a typecast to obtain it.
Try to use an ExceptionNotify event like this:


uses ExceptionLog, ECore, ETypes; // The required units...

procedure MyNotify(ExcRecord: TEurekaExceptionRecord; var Handled: Boolean);
Var
Code: DWord;
begin
if (ExcRecord.ExceptionObject is TYourExceptionType) then
Code := TYourExceptionType(ExcRecord.ExceptionObject).Erro rCode;
end;