|   | 
	 
  
    | 
RSS Feed - WebSphere MQ Support
 | 
RSS Feed - Message Broker Support
 |   
 
  
	     | 
	 | 
   
 
  
	|  error handling | 
	« View previous topic :: View next topic »  | 
   
  
  	
	  
		
		
		  | Author | 
		  Message
		 |  
		
		  | ramki | 
		  
		    
			  
				 Posted: Fri Apr 05, 2002 2:41 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		   Apprentice
 
 Joined: 25 Sep 2001 Posts: 28
  
  | 
		  
		    
			  
				How do I force an error and show up an error message in the NTviewer.
 
 
I used the below code
 
IF A > 0 THEN  
 
      SET OutputExceptionList.UserException.Text='@@@ User Description error@@@';
 
	  ;
 
   ELSE 
 
      SET some processing;
 
END IF;
 
 
But this didn't raise any error.
 
Then I tried to workaround the following errored out but not for the reason it has to.
 
SET OutputExceptionList.UserException.Text='@@@ User Description error@@@'|| OutputExceptionList.UserException.Text ;
 
 
Please suggest me on this. Thanks in Advance.
 
Regards,
 
Ram
 
 | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | kirani | 
		  
		    
			  
				 Posted: Fri Apr 05, 2002 4:54 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		   Jedi Knight
 
 Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA 
  | 
		  
		    
			  
				I assume you also want to rollbak the transaction in case of failure. 
 
If you are using WMQI 2.1, you can make use of THROW clause in ESQL. 
 
 
IF A>0 THEN
 
  THROW USER EXCEPTION ....... 
 
ELSE
 
  .....
 
END IF;
 
 
Please refer to ESQL reference mannual for more details.
 
 | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | ramki | 
		  
		    
			  
				 Posted: Mon Apr 08, 2002 12:28 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		   Apprentice
 
 Joined: 25 Sep 2001 Posts: 28
  
  | 
		  
		    
			  
				I tried to refer the ESQL of MQSI  Version 2.0.1, I couldn't find the THROW clause. Can you point me to the pageno of the document.
 
Thank you very Much for the reply!
 
Regards,
 
Ram | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | Miriam Kaestner | 
		  
		    
			  
				 Posted: Mon Apr 08, 2002 12:29 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		   Centurion
 
 Joined: 26 Jun 2001 Posts: 103 Location: IBM IT Education Services, Germany 
  | 
		  
		    
			  
				ESQL THROW is only available since V2.1.
 
But you could use the Throw node instead. | 
			   
			 
		   | 
		 
		
		  | 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
  | 
  		 
	   
	 | 
   
 
  	 | 
	  |