here is some background:
I am using the MQSeries/Websphere .Net classes provided by Microsoft.
The Websphere Windows Client software is required in order to use the
..Net classes. However, I would like to warn users that they need this
software, otherwise they will get a TypeInitializat ionException ("The
type initializer for 'IBM.WMQ.MQTrac e' threw an exception.").
Here is my code to catch that in the form load event:
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
MQEnvironment.H ostname = "x"
MQEnvironment.P ort = "x"
MQEnvironment.C hannel = "x"
Dim qmgr As MQQueueManager
Try
qmgr = New MQQueueManager( "x")
Catch ex As System.TypeInit ializationExcep tion
MsgBox("an exception occurred. You probably need to
install the MQSeries client software.")
End Try
End Sub
This seems to work ok.
However, the same TypeInitializat ionException is thrown when I close my
app, and I can't seem to find a way to catch it.
I also tried catching it after calling dispose, but that didn't help
either:
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Disp ose()
End If
Try
MyBase.Dispose( disposing)
Catch ex As System.TypeInit ializationExcep tion
MsgBox("an exception occurred.")
End Try
End Sub
The exception occurs sometime after Dispose is called, and I am unable
to catch it.
Here is the stack trace:
at IBM.WMQ.MQTrace .Trace(UInt32 component, UInt32 module, String
traceText)
at IBM.WMQ.MQBaseO bject.Trace(UIn t32 module, String traceText)
at IBM.WMQ.MQQueue Manager.Finaliz e()
The debugger offers me this after the error is thrown, in case this is
important:
Disassembly:
00000000 push esi
00000001 push eax
00000002 mov dword ptr [esp],ecx
00000005 mov esi,edx
00000007 cmp dword ptr ds:[01101FBCh],0
0000000e je 00000015
00000010 call 7942EABE
00000015 push dword ptr [esp+0Ch]
00000019 mov edx,esi
0000001b mov ecx,2Ch
00000020 call dword ptr ds:[011041C0h]
00000026 nop
00000027 nop
00000028 pop ecx
00000029 pop esi
0000002a ret 4
Thanks. 1 3086
I am using the MQSeries/Websphere .Net classes provided by Microsoft.
err... I mean to say provided by IBM.
Matt This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: DraguVaso |
last post by:
Hi,
In my application, on some given actions while debugging in Visual Studio, I
suddenly get a "System.ComponentModel.Win32Exception was unhandled"
Message="Error creating window handle." exception.
The problem is that this exception isn't raised somewhere in a method, so it
just shows up, and it causes the application to shut down.
Is there anyway how to catch this kinds of exceptions? Can I put somewhere a
|
by: Emil Astrom |
last post by:
Hi!
I wonder if there's a way to retrieve information about thrown, not yet
handled exceptions. My situation is similar to the code below:
class MySession : IDisposable
{
:
:
Dispose()
|
by: ahaupt |
last post by:
Hi all,
I'm currently writing a load of class libraries, but not the main
application iteslf.
I want to provide some method for reporting errors back to the main
application.
At the moment I have a bool errBl and a string errMsg in my classes.
When errBl is ture, one could see what the error was in errMsg.
|
by: Tyler Foreman |
last post by:
Hello,
I had an earlier post regarding a strange exception I
(thought) I was getting in my windows form. I have since
been able to trace the problem to a picturebox control on
my form. I can reproduce the exception consistently, but
it seems to be timing dependent. Here is what happens:
I have a subform that I open, load an image from a file
into my PictureBox, take some user input, then I hide the
|
by: Giovanni Bassi |
last post by:
Hello Group,
I am running an operation in a different thread. There are resources that
are released when the thread is done running. This is done at the end of the
execution as it raises an event, and then the operation handling this event
calls threaded object's dispose method.
The problem is: If an exception is thrown the event is never raised, the
operation never executes dispose and my resources get stuck on the memory
until the app...
| |
by: ZorpiedoMan |
last post by:
Well, I'm still wondering around in the "land of the lost exception"...
It seems that controls that are bound to a class and the class throws an
error in the SET method of the bound member, the exception cannot be
caught. I have wrapped my entire application in all the global
exception handlers I can find, and still to no avail. In fact all the
Try/Catches and Exception event handlers are worthless...
Put on your advanced thinking...
|
by: ashishjainism |
last post by:
I am unable to install my windows service and the installutil is throwing the following error:
Running a transacted installation.
Beginning the Install phase of the installation.
See the contents of the log file for the d:\practice in .net\mywindowsservice\mywindowsservice\mywindowsservice\bin\practiceservice.exe assembly's progress.
The file is located at d:\practice in...
|
by: Buddy Home |
last post by:
Hello,
I'm trying to upload a file programatically and occasionally I get the
following error message.
Unable to write data to the transport connection: An established connection
was aborted by the software in your host machine.
Stack Trace
at System.Net.Sockets.NetworkStream.Write(Byte buffer, Int32 offset, Int32
|
by: Ralf Jansen |
last post by:
For logging purposes i want to determine if the current executing code is
running in an ~exceptionhandling context~. I need no details about the exception
just if an exception has been thrown and hasn't been handled yet.
Following code should make clear what i mean and where i need that info.
try
{
try
{
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |