Important: as a general rule, you should write your application in a such way that it will behave correctly without EurekaLog on board. This means that if your or 3rd party code throws an exception in a DLL - it must be handled in a way that you expect. For example, by showing an error message, canceling action, retrying, etc. Once your application behaves like it is supposed to do - then you add EurekaLog for it. EurekaLog will auto-handle all unhandled exceptions automatically (by hooking few well-known places), and for everything else - you can call EurekaLog from your own handlers when needed. In other words:
Many developers prefer to use exception tracer tool in their DLLs. Exception tracer collects information about problems in your code, allowing you to diagnose failures more easily.
Remember what exception tracer does to your application:
EurekaLog-enabled executable
Exception tracer includes its code in your module. It also injects some data - debug information and options. Both (code and data) are required for exception tracer to function.
When you have more than just single executable module - things become interesting. Exception tracer could be inserted into one module or into each module:
First case is good when you can afford enabling exception tracer in host application. Centralized management will allow you to reduce performance cost when you have many DLLs. For example, consider application with 50 DLLs (keep in mind "plugins" scenario). Each exception must be analyzed by exception tracer. If each DLL has its own exception tracer - then each exception will be analyzed 50 times. A good idea would be to have only one instance of exception tracer, so information is collected only once. Any DLL can ask central exception tracer for information about exception.
Second case is good when host application is out of your control. Since you can not use exception tracer in host - then the only choice left is to add it to DLL. Each DLL will have its own isolated exception tracer. Examples are ActiveX (host will be Internet Explorer), COM (host can be Microsoft Office), etc.
See also:
|