Page 1 of 1

add application version to the report

Posted: Thu Oct 13, 2005 3:07 pm
by emailaya
hi

how can i add application version into the report?

thanks

Posted: Fri Oct 14, 2005 8:53 am
by kaju74
Take a look at my topic

viewtopic.php?t=731

Posted: Fri Oct 14, 2005 9:05 am
by emailaya
i saw this post
but didnt really understand where exactly did u write this code
the advantage of madExcept is that u dont need to write any code...
its not even a component with events :)

Posted: Fri Oct 14, 2005 9:18 am
by kaju74
...except if you want to add additional informations!

Add the following line to a unit which will be loaded very first in your app:

Code: Select all

initialization
  RegisterExceptionHandler(ExceptionFilter, stDontSync);
Now, write the code for "ExceptionFilter" somewhere in this unit:

Code: Select all

procedure ExceptionFilter(const exceptIntf : IMEException; var Handled : Boolean);
begin
  BugReportHeader['application version'] := VarContainsAppVersion;
end;
The code to retrieve the appversion should be included by yourself. If you don't know, just reply and I'll copy you the code snippet.

Posted: Fri Oct 14, 2005 9:43 am
by emailaya
ok
10x allot :)

i will try it

i know how to get the file version, 10x :)

Posted: Fri Oct 14, 2005 9:54 am
by emailaya
i added what u said
and got the following when building the project:

access violation in:
madExcept_wizard.bpl

and:
[Error] Main.pas(3654): Undeclared identifier: 'IMEException'
[Error] Main.pas(3656): Undeclared identifier: 'BugReportHeader'
[Error] Main.pas(3664): Undeclared identifier: 'RegisterExceptionHandler'
[Error] Main.pas(3664): Not enough actual parameters

Posted: Fri Oct 14, 2005 9:59 am
by kaju74
are you sure you:

a) using madExcept3
b) included "madExcept" to the "uses"

???

Posted: Fri Oct 14, 2005 10:21 am
by emailaya
yes and yes
i restarted delphi
i keep getting the access violation during building of the app

only now, i get this error:
[Error] Main.pas(3656): Undeclared identifier: 'BugReportHeader'

Posted: Fri Oct 14, 2005 10:29 am
by kaju74
:blush: My failure:

Code: Select all

procedure ExceptionFilter(const exceptIntf : IMEException; var Handled : Boolean); 
begin 
  with exceptIntf do
    BugReportHeader['application version'] := VarContainsAppVersion; 
end; 
Plz install the latest beta of ME3!

Posted: Fri Oct 14, 2005 10:40 am
by emailaya
i prefer not to install a beta
if it works, along with the access violation error
i'll keep the version i have

Posted: Fri Oct 14, 2005 10:42 am
by emailaya
ok it works
10x allot :)