ChoreQuit doesn't display the error message

Post Reply
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

ChoreQuit doesn't display the error message

Post by bunchukokoy »

Hi Guys! :D

May I ask for your help. Attached is a screen shot of my TI included in a chore.
My user runs this chore, not the TI. But it seems when my user inputs an incorrect input format, the chorequit function doesn't work. Instead it shows, Chore Completed Successfully.

Please help. Am I missing something in this?

Thanks. :D
untitled.jpg
untitled.jpg (28.73 KiB) Viewed 2566 times
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: ChoreQuit doesn't display the error message

Post by rmackenzie »

You are doing a ProcessQuit before your ChoreQuit... so it will never get round to processing that instruction because you already quit the process! Try removing that line (ProcessQuit) and see if that gives you the message log record you are looking for.
Robin Mackenzie
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: ChoreQuit doesn't display the error message

Post by Alan Kirk »

bunchukokoy wrote:Hi Guys! :D

May I ask for your help. Attached is a screen shot of my TI included in a chore.
My user runs this chore, not the TI. But it seems when my user inputs an incorrect input format, the chorequit function doesn't work. Instead it shows, Chore Completed Successfully.

Please help. Am I missing something in this?

Thanks. :D
Yup. ChoreQuit isn't by itself an error; it's just a flow control statement. Consequently even if it quits, it's "succesful". If you want it to report that there's been an error (and don't mind the logs showing one), you have to generate an error.

The easiest way to do this is to put an ItemReject(); statement in your Prolog. (Yes, Itemreject has no real context outside of the Metadata and Data tabs, but it works anyway.)

Robin mentioned the point that I was going to make about the order of ProcessQuit and ChoreQuit but even if you fix that, you won't get an error for invalid input without creating the error.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

Re: ChoreQuit doesn't display the error message

Post by bunchukokoy »

Thank you Sir Kirk and Sir Mackenzie!
Robin mentioned the point that I was going to make about the order of ProcessQuit and ChoreQuit but even if you fix that, you won't get an error for invalid input without creating the error.
Yes, this also doesn't prompt an error.

The easiest way to do this is to put an ItemReject(); statement in your Prolog.
This works good. Both processquit and chorequit don't give an error.

Tihengksalat!
Post Reply