eosnetworkfoundation / mandel

Obsolete. Use https://github.com/AntelopeIO/leap instead.
Other
87 stars 30 forks source link

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

Closed linh2931 closed 1 year ago

linh2931 commented 2 years ago

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.

spoonincode commented 1 year ago

tracked in leap now