Is there a way in IS to distinguish Warnings from Errors? As per the requirement of my project, I need to log Errors and Warnings in 2 separate file. Grabbing errors is simple - I use Try/Catch block and a getLastError in the Catch block does the trick. I extract all the useful info from getLastError and pass it on to a custom logging utility that writes formatted message to a log file. I want to be able to do the same thing for warnings… only if there was a way to separate wheat from chaff.
Any help is appreciated.
what exactly do you mean by warnings? could you give an example of it?
webMethods released an Error Message Reference Guide that is available on advantage.
The Integration Server Administrator Guide details the Warnings, Errors and Information messages.
Thanks for the response guys. What I need is some kind of flag that will distinguish whether the exception caught was an error or a warning (if warning do throw exceptions). The objective is to log such messages in a file and have a monitoring service grep the log file and send appropriate alerts based on the type of messages, e.g. for a warning - notify Glenn Homza and for an error notify Jason Birnbaum.
Saurabh - as for giving an example is concerned… I do not even know what kind of errors and/or warnings may come up, because I’m talking about system exceptions not the application errors and warnings, where it is in my hand to define whether an exception is just a warning or an error.
I was hoping that there would be some pipeline variable, that would classify the exception as ‘Warning’ or an ‘Error’. I checked all the variables in the lastError that gets populated in case of service exception, but there is no such field
Ray - the guide is helpful when we are doing the troubleshooting. For now, I just want to log the errors and leave the troubleshooting to the support guys, who can use this guide for help. I did browse thru the guide and I hope I have not missed out something in there that will also help me identify an exception as a warning.
Based on the Exceptions your application throws based on that you have to decide whether it is Warnings or Actual Code errors or transient errors and notify the users depends on this.So for this you need to create various test plans and define the problems as Warnings Vs Errors.
you still need to explain your problem in detail. I still fail to relate a system exception as Warning!! Using getLastError by itself implies that there was a error and not a warning.
I still think giving an example will extremely help us suggest a solution for you.
Based on the info provided till now, the solution would be to parse the “errorDump” from getLastError and determine if it is “error” to be forwarded to support!! doesnt sound like a good solution