write message to .err file
I tried to use WriteErr(sErrMsg: string)to write error message to .err file. But it doesn't work even I include "Kernel.bdh" in my script.
I am testing a web application. How can I make it work?
Thanks in advance,
Re: write message to .err file
What version of SilkPerformer are you using? I just tried the following:
And it worked fine. Here's the output in my .err file.
I'm using 4.5.0, Build 941.
You do have to have error files turned on. And please note that you get a different .err file for each user, so if you only look at the error file for user 1 and user 2 is where the error happened....
Additionally, WriteErr doesn't increase the error count for a user or agent or show up in the monitor window. If you want to do that, you have to use RepMessage with SEVERITY_ERROR as the second argument. RepMessage errors will also show up in the .err file if SEVERITY_ERROR is used.
A sample of my .err file using RepMessage:
So you might want to consider using RepMessage instead of WriteErr. RepMessage also reports in the repository and the time series data. WriteErr is more for logging information into the error file, along the lines of the write and writeln functions. But a lot of people work without .wrt enabled and with .err files enabled.
A concerned Borland customer, a fly in the ointment, a wrench in the works.