COMMUNITY

Vague Error Messages in Macro Code

Hello everyone. Hope everyone is getting on!

I am having a bit of trouble with my macro code with an undisclosed error source with the following message:

(unknown) : sys.db.SDateTime should be Null<String>

Problem is, it doesn’t give me a clue as to where this problem is. I suspect it’s got to do with compiled code once it gets passed the macro stage, which would mean the macro compiled code is correct, but when the generated code gets compiled it doesn’t seem to know the location of the problem.

I’ve checked several times in several possible locations in my code but I can’t seem to find the culprit. Everything seemed to compile correctly before this commit. I’ve glanced over this a few times but I can’t see anything immediately obvious that would cause the above error.

Any ideas?

You get (unknown) position because you probably do that in an init macro. Current context position for init macros is unknown. Try to invoke that as an expression macro.

I’ve managed to pinpoint the error and fixed it. I just needed time to calm my mind it seemed.

Your advice did help, though, as it was obvious what the problem was when I found it.