ErrorException thrown

td_js_buffer::add_to_header - the header JS was already rendered when you called td_js_buffer::add_to_header() (ex: was called to late)