Re: Unhandled Exception in Form Load in EXE but not in IDE

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks. As I said, I believe this is a bug as errors that are trapped in the
IDE by the normal Try-Catch syntax are not caught in an EXE unless the JIT
switch is set and a PDB is generated. The product should behave consistently
one way or the other. If this is by design then it is a silly design but I
suspect that this was never thought through carefully so is not by design.

It does appear that a custom error handler is the only way to trap these
sort of errors. Hopefully this will be fixed/redesigned in a later release.

I think you can close this one out as there does not seem to be any Hotfix
and there is a work around.

Thanks again,

Mark


"Walter Wang [MSFT]" <wawang@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:HKZfHUOzGHA.4464@xxxxxxxxxxxxxxxxxxxxxxxx
Hi Mark,

If you set the "Debug Info" from "pdbonly" to "none", a required
DebuggableAttribute is not emitted in the result assembly. Internally the
framework checks this attribute to determine whether or not to use the
DebuggableCallback instead of the normal Callback.

By default, a Release configuration has setting "pdbonly", it will only
emit some attribute in the assembly; you don't need to release the .pdb
file.

So the answer to your last question about whether or not it's a bug in IDE
is: it's not a bug in IDE. As I wrote in my first reply, this should still
be considered as by design.

Back to initial requirement, if your desire is to report the exception
with
your own dialog, I think customizing the built-in exception dialog is the
way to go. You also don't need to put many try-catch block in your code.
Remember, this issue only applies to the event triggered by NativeWindow
(WndProc callback), normal program exceptions are not effected.


Regards,
Walter Wang (wawang@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.



.



Relevant Pages

  • Re: Visual Studio IDE Issue
    ... Plus you did not provide which version of IDE ... in design view if I attempt to change the name of control it ... Is that just a bug in the IDE? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Software bloat (Larkin was right)
    ... My first Digikey catalog was a flimsy "newsletter" style ... considerably longer to "program" than design. ... because SMB connectors have a defined part number prefix. ... has developed a bug. ...
    (sci.electronics.design)
  • Re: Running both in the IDE and on a remote host
    ... I can't get this to work in the IDE. ... > Parser Error Message: Could not load type 'eNPTest02.WebForm1'. ... > The Design and HTML views of eNP02.aspx both display fine. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Running both in the IDE and on a remote host
    ... Since debug mode opens IE and loads my page from localhost, ... I can't get this to work in the IDE. ... Parser Error Message: ... The Design and HTML views of eNP02.aspx both display fine. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: OT: Exchange (Was Re: OpenVMS - When downtime is not an option)
    ... application bug to provide access to protected data and/or provides ... the bugs *only* affected Exchange Server. ... Server* design flaw, not a Windows flaw. ... Microsoft product and those same designers and programmers have probably ...
    (comp.os.vms)