Skip to Main Content
Cloud Management and AIOps


This is an IBM Automation portal for Cloud Management and AIOps products. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).

Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.

Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Future consideration
Created by Guest
Created on Nov 25, 2020

try/catch in Impact Policy should give full stack trace

When writing Java Script Impact Policies I noticed the following:
In the below code example Log(error.stack) seems to only output a truncated stack
trace, which isn't really much use in debugging. I see that I can use error.message,
but that does not give me the same output as if I hadn't bothered with try/catch at
all. It would be nice if error.stack offered full output (see below for
details)?

try {
//some code
}
catch(error) {
Log("An error occured during policy Execution...see stack trace below.");
Log(error.stack);
Log(error.message);
}
finally {

//some code

}


When ran against an example I got the following output:



20 Nov 2020

12:08:41,467: [TEST_TT_MonitorAutoticketJS][pool-2-thread-102283]Parser

log: An error occured during policy Execution...see stack trace below.



Log(error.stack) output: 20 Nov 2020

12:08:41,468: [TEST_TT_MonitorAutoticketJS][pool-2-thread-102283]Parser

log: at pool-2-thread-102283:733 (main)

at pool-2-thread-102283:1069



Log(error.message) output: 20 Nov 2020

12:08:41,468: [TEST_TT_MonitorAutoticketJS][pool-2-thread-102283]Parser

log: com.micromuse.common.util.NetcoolException: Die Datenquelle

NCOMS_SPUx ist nicht vorhanden.



For error.stack I would have expected something like:



20 Nov 2020

12:03:03,691: [TEST_TT_MonitorAutoticketJS][pool-2-thread-102233]Caused

by: org.mozilla.javascript.EcmaError: TypeError: Cannot find function

printStackTrace in object JavaException:

com.micromuse.common.util.NetcoolException: Die Datenquelle NCOMS_SPUx

ist nicht vorhanden.. (pool-2-thread-102233#‌1082)



org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3951)



org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3929)

org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3962)



org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3981)



org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:4053)



org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2425)



org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2407)

org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1322)

org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)



org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)



org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)

org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3282)



org.mozilla.javascript.Context.callFunctionWithContinuations(Context.java:1312)



org.mozilla.javascript.Context.executeScriptWithContinuations(Context.java:1279)



com.micromuse.response.common.parser.JavaScriptPolicy.execute(JavaScriptPolicy.java:93)



com.micromuse.response.common.parser.PolicyExecutor.executePolicy(PolicyExecutor.java:150)



com.micromuse.response.common.parser.PolicyExecutor.executePolicy(PolicyExecutor.java:241)



com.micromuse.response.server.MessageProcessor.processMessage(MessageProcessor.java:317)



com.micromuse.response.server.MessageProcessor.processMessage(MessageProcessor.java:257)



com.micromuse.response.server.SynchronousMessageProcessor$1.call(SynchronousMessageProcessor.java:193)



com.micromuse.response.server.SynchronousMessageProcessor$1.call(SynchronousMessageProcessor.java:191)

java.util.concurrent.FutureTask.run(FutureTask.java:277)

com.micromuse.common.util.concurrent.TrackingExecutor$1.run(TrackingExecutor.java:105)



java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160)



java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)

java.lang.Thread.run(Thread.java:818)

Idea priority Medium
RFE ID 147027
RFE URL
RFE Product Tivoli Netcool/Impact