Reportable errors for plugins
Windows visual diff and merge for files and directories
Brought to you by:
christianlist,
grimmdp
I added an optional property to the plugin interface
"GetLastErrorString", and revised WinMerge to report
such an error string as part of the unpacking error.
This includes a modified Excel plugin, which includes
Arthur Barrets document properties & macros patch, and
which has such an error property -- because it is
causing a VB error when I try it, and this patch
propagates the error back to the user.
Screenshot (14Kb jpg) of error dialog
7-Zip (71Kb) of altered & original source files
Logged In: YES
user_id=1195173
I'm not sure that an optional property is the best method.
Another way to go would be to modify the plugin methods to
have an additional out property for ErrorString.
But, that is more invasive, as it requires either changing
all plugins (which I won't do, as some are in Delphi), or
adding new methods & supporting both new and old -- which is
starting to get messy.
Also, we should pass our desired language to the plugin, in
case it can generate its errors in the correct language -- I
think the easiest method is yet another custom property, for
WinMerge to set to the desired language id.
Using a GetLastErrorString property like this requires
non-reentrancy and single-threaded access to the plugin, I
think, but I think we're doing that.
Logged In: YES
user_id=1195173
This patch also revises binary checks to skip them entirely
for files with an unpacker specified, because I can't see
how else to make the MS-Excel plugin work interactively, at
the moment.
Logged In: YES
user_id=631874
Fact is we need way to get errors from plugins without
plugin showing GUI (messagebox/dialog) - since that breaks
folder compare.
We ship compiled plugins with WinMerge so I don't see
problem with just changing interface so that it allows what
we need. Delphi plugins aren't problem, there is just one
and I doubt anybody uses it really, of if one uses then he
must have delphi and he can fix the plugin..
So I'd say just go ahead and fix the interface. Better now
than later.
Logged In: YES
user_id=1195173
I wasn't thinking about that problem with plugin msgboxes,
but that is right -- we have an outstanding problem with that.
I'll look at that.
Also the part of this patch that bypasses binary detection
is not to be applied -- I was mistaken about that being
necessary -- it was some problem with the plugin that has
gone away.