Error message buffer overflow.

I guess what I'm really looking for is a function that will tell me how long the string created by sprintf_P() will be before I actually use it !

You mean before you create it? If you supply a buffer that is too small, by the time sprintf_P tells you how many bytes (and it does) it has written to the buffer, it has already overflowed.