Error message buffer overflow.

I can't help feeling that there's got to be a better solution - something a bit more elegant. Any suggestions?

Well, call me crazy, but I wouldn't allow it to overflow in the first place.
Pragmatic, rather than elegant.