wf49670 / ppgen

Post-processing generator for DP
6 stars 4 forks source link

Catch exception if wrapping fails due to no blanks in line being wrapped #56

Closed wf49670 closed 9 years ago

wf49670 commented 9 years ago

Reported by kdweeks via email.

Code already had a try/except for splitting between 0 and width, but the splitting in the except clause was unprotected, leading to a Python exception if there were no blanks in the line further to the right, either. Added another try/except to protect that, adjusted one error message for clarity, and made sure that if we can't split the remainder of the line that we don't get an extra blank line added.