Problem with madExceptPatch

delphi package - automated exception handling
Post Reply
slemmnord
Posts: 46
Joined: Fri Jan 17, 2014 1:04 am

Problem with madExceptPatch

Post by slemmnord »

Hello Mathias!

I ran into a problem with command-line compilation. I would say it's a bug in how madExceptPatch handles relative paths.

I have the following setup:
The project dpr and mes files are in folder c:\project\source.
The output files go to c:\project\output.
The current directory is set to C:\project.

After compiling the project, the build utility runs madExceptPatch with following command:
tools\madExceptPatch output\project.exe source\project.mes output\project.map

and madExceptPatch returns with exitcode 0 and outputs the following normal messages:
Binary patched.
map file appended

However.... the exe is somehow not correctly patched as the exception dialogs are normal VCL dialogs instead of the custom ones i display via madExcept global handler. If i run the patch again it will complain that exe already has map appended so something was indeed done.

Now, if i replace the command line with absolute paths such as:
tools\madExceptPatch output\project.exe c:\project\source\project.mes output\project.map

...then i again get exit code 0, the same messages and the end result is correct and madExcept handles exceptions.

It seems that relative path for .mes file is somehow confusing madExceptPatch but it still patches the file (with some wrong default settings?).

I think if mes file is implicitly passed on command line and madExceptPatch fails to open/use it then it should return error code.

I'm still using older version -- dated 30.03.2015 - have you made any relevant changes that would warrant retesting with newer version?

Regards,
me :)
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Problem with madExceptPatch

Post by madshi »

Yes, I did make changes at some point, so testing with the latest build would make sense.
slemmnord
Posts: 46
Joined: Fri Jan 17, 2014 1:04 am

Re: Problem with madExceptPatch

Post by slemmnord »

This is indeed already fixed in the current version. Thanks.
Post Reply