I would rather ignore malformed messages than throw a fatal error

Jun 5, 2015 at 5:48 PM
I get a jibberish message

obs[0] = -16
obs[1] = 42
obs[2] = null

This code throws and the server exits - I would much rather ignore a bad message and continue processing.
   private void cbCheck(object[] obs)
    {
        for(int n = 0; n < obs.Length; n++)
            if (obs[n] == null)
            {
                throw new IsisException("null passed as argument " + n + " (counting after the request code) in an Isis multicast");
Coordinator
Jun 5, 2015 at 6:12 PM

No, it doesn’t work that way. If you do that the system would wedge, for sure. You can’t just leave lines out of code you didn’t write. Same concept.

I’ll look it up to see what this is associated with.

Coordinator
Jun 5, 2015 at 6:28 PM
Edited Jun 6, 2015 at 12:38 AM
(Attached copy of Isis.cs not visible here) In the attachment, the specific change you care about are the two places where REMAP was being sent (lines 2623-2627 and 43182-43186). Those now check for nulls. If you prefer you can just take those two patches and wait for me to fully test my stuff and then post it to codeplex, probably in August because I have other things I’m doing first. You could also just go with this version, but it has other changes in it too, and I haven’t run my full regression suite against it. All are believed to be good changes that make the system better. But if you go with the whole thing, test it carefully before rolling it out. Ken
Jun 5, 2015 at 7:10 PM


Thanks for your quick reply and continuing support.

I can wait until you are ready. I'm shooting for a December Code Complete.

I have plenty of other tings to do.

Thanks again,

J.D. Hicks




Coordinator
Jun 5, 2015 at 7:19 PM

OK, well in that case take just the two blocks patching the specific REMAP issue.