Closed ywkaras closed 2 weeks ago
LSan detected a leak in the ImageMagick plugin.
The same failure was repeated.
Would a helper function that takes the format function help clean this up and remove duplication?
Would a helper function that takes the format function help clean this up and remove duplication?
Would be tricky not to lose the source location (showing which function) in the error message.
DM from zwoop: it seems in other places where there’s not room, we do no truncate, rather, we just don’t put anything in there. And we certainly never call SiteThrottledError(), that just seems wrong honestly (from what I can tell, SiteThrottledError() is for serious errors around logging completely, disk full) So, I just wouldn’t produce an error here at all (A Dbg() would be more appropriate I think) I’m ok leaving teh truncation if that’s what you prefer Looking more, if you really want a message here, maybe like this: if (res < 0) { SiteThrottledNote("%s", buffer_size_exceeded_msg); (these are incredibly sparsely used though)
Cherry-picked to v10.0.x
Plus other miscellaneous cleanup/improvement.