Fixed Exceptions don't get logged if the exception message is longer than the size of a TEXT field (64k bytes)

thedude

Well-known member
Affected version
1.5.21
We were hunting down an issue with one of our add-ons that wasn't appearing in the XF server error log. Eventually we found that the message being passed to
Code:
throw new XenForo_Exception()
was a bit longer than the 64k TEXT field limit, so the error was not saved in the database.

We've resorted to substr'ing our potentially large exception messages with a 65535 byte limit. If this could be done at XenForo_Error::logException or somewhere up the chain, we wouldn't have to worry about exception messages possibly not being logged.
 
You can change the table to have a mediumtext column and go from 64k => 16mb. Which should handle most things.
 
Thank you for reporting this issue. The issue is now resolved and we are aiming to include that in a future XF release (1.5.23).

Change log:
Apply limits when logging exceptions to ensure they aren't silently ignored.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Top Bottom