Throw an Exception when the header is already been sent

Please see the details of the discussion at  issue #3990
It would be better to use sprintf here, no ?

"Headers already sent in %s on line %d"