They do say any day you learn something is a day not wasted! Thank you. I wasn't massively worried about it as the library was working correctly, but I wanted to understand why I was seeing -1 for this.
Just out interest, Chatgpt suggested that I only use @error when developing code as nearly all the code I use would be writing to registry, so in general @error is not very useful for production systems. That is in general as usually a production code - everything is working! One or two bits of coding, I think it might make sense to keep the @error as printers etc get changed over time, even if the kixtart coding doesn't.
So I will review what @error coding I have, see where it makes sense to add the @error and where I can just get rid of it as my next job is to only output to the console what I don't mind an end user seeing. They don't see it anyway as the startup script is not visible to the end user and the logon script runs minimised. But I still would like to tidy up the output to only high level messages.
It helps to know about Return Value and Return Code in the context that I was seeing with the load xml files.
|