|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
perl MQSeries error message |
« View previous topic :: View next topic » |
Author |
Message
|
charliema |
Posted: Wed Aug 04, 2004 12:39 pm Post subject: perl MQSeries error message |
|
|
Newbie
Joined: 04 Aug 2004 Posts: 3 Location: CA
|
I've installed MQSeries perl module (version 1.23) on Sun OS 5.8. Everything seems fine except I seem to be getting error messages written to STDOUT whenever an error is encountered with a method call. I've done some MQ stuff with C++ before, and have never encountered this; so I assume this is a perl module 'feature'. Is there a way to turn this off??
The error message is just the text representation of the reason code.
Any advice would be greatly appreciated.
thanks. |
|
Back to top |
|
 |
clindsey |
Posted: Wed Aug 04, 2004 3:17 pm Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
I can tell you how I handle it. As always with perl, I am sure there is more than one way.
The default carp exception handler is the guy printing to stdout. I provide my own handler and register it in the perl mq call, for example:
Code: |
my $inqQ = MQSeries::Queue->new
(
QueueManager => $g_qMgr,
Queue => $q,
CompCode => \$compCode,
Reason => \$reason,
Carp => \&MQLogException,
Options => $options,
);
|
My MQLogException looks like this:
Code: |
sub MQLogException
{
my $message = shift;
foreach my $exception ( split(/\n+/,$message) )
{
# write to LogLite error log
write $g_logObj->write("\n$exception", 1 ,__FILE__, __LINE__);
}
}
|
Hope this helps,
Charlie |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|