ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » perl MQSeries error message

Post new topic  Reply to topic
 perl MQSeries error message « View previous topic :: View next topic » 
Author Message
charliema
PostPosted: Wed Aug 04, 2004 12:39 pm    Post subject: perl MQSeries error message Reply with quote

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
View user's profile Send private message
clindsey
PostPosted: Wed Aug 04, 2004 3:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » perl MQSeries error message
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.