This is "Advanced/Code/Hooks" page in EurekaLog project's options.
Hooks code options
Each option includes hooks for specific cases (i.e. Pascal units). You should enable option to install hook (and invoke EurekaLog) or disable option to remove hook. See also: External tools options page.
Usually these settings are set by selecting type of your project. You rarely need to change them.
Additional hooks are not tied to specific project type and may be used in any project. However, all of these options installs code hook - thus, they may be incompatible with some EXE cryptors, packers, protectors. Additional hooks may be customized by you depending on your needs.
1. "Auto-handle TThread exceptions" - option enables backward-compatible EurekaLog 6 behavior for threads. When you enable this option - EurekaLog will automatically handle exception in TThread. Default behavior is not to handle exception, but allow it to be saved in TThread.FatalException property, which can be analyzed/handled by caller thread.
Warning: enabling this option may result in multiple error dialogs at the same time (if several exception occur in multiple threads).
Note: it's not recommended to use this option. You should implement proper error handling for threads instead.
2. "DLL callbacks to host" option allows DLL to use exception manager from main module. This option is used with "Lightweight DLL" profile when you need to call methods from exception manager (since there is no exception manager in DLL).
Warning: do not use this option for "Standalone DLL" profile or any other profiles except "Lightweight DLL".
This options is turned on automatically for lightweight DLL profile. Usually you don't need to manage it manually.
This option can be used without EurekaLog in current module.
For more information: see using EurekaLog with DLLs.
3. "Map OS errors to exception classes" option converts all exceptions of EOSError class to (new) exception classes (from EMapWin32 unit). For example, there will be EOSAccessDenied exception raised instead of EOSError with ErrorCode = 5. This option will replace exception classes globally in all application. Old filtering code (i.e. "on E: EOSError do") should still work, because all new exception classes descend from EOSError. You can use this option to create exception filters for OS errors.
It's recommended to keep this option enabled.
This option also can be used without EurekaLog in current module.
4. "Fix TObject.SafeCallException for hardware exceptions" option fixes bug from Quality Central bug report #81725.
TObject.SafeCallException works only for Delphi exceptions. If there is a hardware exception raised in safecall-method (like access violation or div by zero) - TObject.SafeCallException will be ignored, instead the fixed code of E_UNEXPECTED ($8000FFFF) will be used.
With current implementation it is impossible to alter this behaviour except of using ugly workarounds.
The problem seems to be in System._HandleAutoException routine. This routine does not call TObject.SafeCallException if exception in question is not Delphi exception.
Enable this option for COM applications or any other applications which use safecall-exceptions.
This option can be used without EurekaLog in current module.
Notes:
5. "Low-level injection hooks" option allows or forbids using of low-level hooks. Low-level hooks use code injection (e.g. overwrite machine code with JMP CPU instruction).
Using low-level hooks allows EurekaLog to act automatically. Otherwise, you need to call EurekaLog manually. Additionally, using low-level hooks allows you to capture low-level information such as CPU state. Low-level hooks are also required for additional WER functionality.
It is recommended to keep this option enabled when possible. Disable it only for special cases.
Important Note: We do not recommend to change this option from default value ("Allow all") when compiling with LLVM.
Low-level hooks in external modules ("Allow all" or "Allow for external modules only"):
Disable this option (set to "Disable all") if you are using software protection tool that monitors integrity of whole process. Disable this option (set to "Allow for current module only") if you are loading and unloading several DLLs with EurekaLog in a different order (e.g. load A.dll, load B.dll, unload A.dll, unload B.dll). Disable this option (set to "Allow for current module only") when there are conflicts with 3rd party hooks/exception tracers from external DLLs. Important Note: Do not disable this option for application build with LLVM. Additionally, EurekaLog will not be able to track threads when this option is disabled. It is recommended to use BeginThreadEx/TThreadEx or (for any other thread) call SetEurekaLogStateInThread function to enable EurekaLog in thread and call EThreadsManager._NotifyThreadGone function to notify EurekaLog about thread's termination.
Low-level hooks in current module ("Allow all" or "Allow for current module only"):
Disable this option (set to "Allow for external modules only") if you are using software protection tool that monitors integrity of application (current module). Important Note: Do not disable this option on Delphi/C++ Builder 2007 and earlier. Do not disable this option when compiling with LLVM. Otherwise EurekaLog will not be able to track life time of exceptions.
See also:
|