What message isn't getting handled?

I occasionally see a message that is not getting handled. I have put a 'to <any>' handler to catch these as a debugging tool.

But the next piece of the debugging tool is missing. I need to 'put message' or something so I can find out during debugging what message I need to add a handler for. The message that is not getting handled is not coming from my code directly. I assume it is something coming from the guts of Eggplant. I have a handler for 'to put', but there is another message coming in from somewhere outside my control.

to handle <any> someMessage
put someMessage
end <any>

was my attempt and it failed miserably. The idea is to print out the unhandled message object somehow.

Is it possible?

Thanks!
-edj

Comments

  • SenseTalkDougSenseTalkDoug ForumAdmin admin
    The functions that will give you this information are "the params" (which will give you the command or function name and all of its parameters) or "param(0)" (just the command or function name).

    I'm curious what "unhandled" messages you are getting, although working with <any> handlers can be tricky (they really do catch everything, although not recursively for the same message) Their use is not really recommended in ordinary circumstances, although I can see that you are just using them as a tool to gain some insight into how things work, which is reasonable but may also be confusing!
  • Great! I was trying to use parameterList(), but it was empty. 'the params' is working.

    So now I also can answer your question. The unhandled message I was getting was the makeNewObject message!

    I had made a 'to initialize' handler, but was relying on the implicit makeNewObject to call it. - And it does, until I have a to <any> handler.

    Well, it all makes sense now! <yeah, right>

    Thanks!
    -edj
Sign In or Register to comment.