Funny that you are mentioning this. I came across the same issue a couple of days ago while writing the EagleFiler Capture macro.
My clumsy workaround is to get – via UI scripting – the value of the name field of the macro opened by the editMacro command and check it against the should-be name.
So, I definitely agree: it should return an error.