When we log an exception from a contract, we want to remove any new lines put in by the contract writer and limit the size of the message. As suggested in the review of https://github.com/eosnetworkfoundation/mandel/pull/733, use of fc::format_string is inefficient; a general purpose clean method that optionally escapes control characters (specifically newline) and truncates can be created for such a purpose.
When we log an exception from a contract, we want to remove any new lines put in by the contract writer and limit the size of the message. As suggested in the review of https://github.com/eosnetworkfoundation/mandel/pull/733, use of
fc::format_string
is inefficient; a general purposeclean
method that optionally escapes control characters (specifically newline) and truncates can be created for such a purpose.