Changed error handling for clearText
Merge pull request #3386 from austenke/master

Changed error handling for clearText