eosnetworkfoundation/mandel

clean function for escaping control characters in a string and truncating it

Closed this issue · 1 comments

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 #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.

tracked in leap now