Skip to Main Content

PeopleSoft Enterprise

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Exception handling - not to dispaly context

user12921829Oct 12 2017 — edited Nov 9 2017

Hi All,

In a Application Engine, when  i try to capture the exception and handle it (message box or log file) using &caught.tostring(false), it seems that the context is always getting displayed.

PeopleBooks says that "ToString([AddContext])"

It always returns the context information about where the error occurred at the end of the message. To suppress this, specify AddContext as false.

no matter what we give - true or false, it always displays the context , i.e. from where the exception originated like App Package.Class.etc etc....

Any ideas to suppress the context and just to get the exception that i throw?

try

   MessageBox(0, "", 0, 0, "Before Error");

   throw CreateException(23210, 1, "Test123");

catch Exception &caught

   Local string &String = &caught.ToString( False);

   MessageBox(0, "", 0, 0, &String);

end-try;

i just want to display "Test123" - not "Test123. Appengine.main.etc,etc"

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2017
Added on Oct 12 2017
3 comments
212 views