We use MadExcept to handle exceptions, and now we are trying to integrate our app in Thinfinity VirtualUI from Cybelesoft (cybelesoft.com). It seems the way the error boxes are constructed without VCL doesn't work well together with Thinfinity. Only a empty blue box is diplayed - see enclosed picture.
Does anyone have experience of handling this?
/Anders
Error box visibility in virtual environment
Error box visibility in virtual environment
- Attachments
-
- Empty error box
- 2019-02-26 17-51-21.png (8.28 KiB) Viewed 4278 times
Re: Error box visibility in virtual environment
I've never seen this before. Not sure what Thinfinity VirtualUI does exactly. Have you tried contacting their support?
Re: Error box visibility in virtual environment
I am not quite clear on the function of Thinfinity either, but I guess they are transforming VCL drawing to HTML5 in som electronic way, and as MadExcept doesn't use VCL, they are probably missing it.
A simple solution to this would be to catch the errors and construct my own error boxes - with VCL. I understand this is no good, but how bad is it?
/Anders
A simple solution to this would be to catch the errors and construct my own error boxes - with VCL. I understand this is no good, but how bad is it?
/Anders
Re: Error box visibility in virtual environment
The key problem with VCL is that it's not thread safe. So you can't show VCL forms in the context of secondary threads. However, madExcept does most of its work in secondary threads to make sure that a crashed main thread doesn't stop madExcept from working correctly.
You can tell madExcept.RegisterExceptionHandler() to call your handler in the context of the main thread. If you do that, you can show your own VCL form in there and then set "handled := true" to tell madExcept that you don't want madExcept's own exception box to be shown. Of course this will only work if the main thread is still alive and kicking, otherwise madExcept won't be able to call your handler in the context of the main thread.
You can tell madExcept.RegisterExceptionHandler() to call your handler in the context of the main thread. If you do that, you can show your own VCL form in there and then set "handled := true" to tell madExcept that you don't want madExcept's own exception box to be shown. Of course this will only work if the main thread is still alive and kicking, otherwise madExcept won't be able to call your handler in the context of the main thread.